From d376187cd5c285509cbb3d205bf0689268f023a5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 5 Nov 2019 09:05:55 +0100 Subject: bin/nit-picker: build-duration-check -> once-a-day-check --- bin/nit-picker | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin/nit-picker') diff --git a/bin/nit-picker b/bin/nit-picker index 03266dd..2b92b84 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -101,15 +101,15 @@ local_irc_say() { mysql_load_min_and_max_versions -build_duration_check=0 +last_once_a_day_check=0 while pgrep -x ii >/dev/null \ || ! ${irc}; do - if [ "$(date +%s)" -gt "$((build_duration_check + 60*60*24))" ]; then - check_build_duration=true - build_duration_check=$(date +%s) + if [ "$(date +%s)" -gt "$((last_once_a_day_check + 60*60*24))" ]; then + do_once_a_day_checks=true + last_once_a_day_check=$(date +%s) else - check_build_duration=false + do_once_a_day_checks=false fi if [ $# -eq 0 ]; then # shellcheck disable=SC2016 @@ -147,7 +147,7 @@ while pgrep -x ii >/dev/null \ printf ' WHERE `repositories`.`is_on_master_mirror`' printf ';\n' - if "${check_build_duration}"; then + if "${do_once_a_day_checks}"; then printf 'SELECT' printf ' "build-duration",' printf '`build_slaves`.`name`' -- cgit v1.2.3-54-g00ecf