diff options
-rwxr-xr-x | bin/nit-picker | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/nit-picker b/bin/nit-picker index 44a3e62..f685458 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -84,6 +84,8 @@ fi mysql_load_min_and_max_versions +build_duration_check=0 + while pgrep -x ii >/dev/null \ || ! ${irc}; do if [ $# -eq 0 ]; then @@ -119,11 +121,14 @@ while pgrep -x ii >/dev/null \ printf ' WHERE `repositories`.`is_on_master_mirror`' printf ';\n' - printf 'SELECT' - printf ' "build-duration",' - printf '`build_slaves`.`name`' - printf ' FROM `build_slaves`' - printf ';\n' + if [ "$(date +%s)" -gt "$((build_duration_check + 60*60*24))" ]; then + printf 'SELECT' + printf ' "build-duration",' + printf '`build_slaves`.`name`' + printf ' FROM `build_slaves`' + printf ';\n' + build_duration_check=$(date +%s) + fi printf 'SELECT DISTINCT' printf ' "binary-dependencies",' |