index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-02 22:12:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-02 22:12:57 +0200 |
commit | 8ff3a370205980e8ab47e76488fb661eb81ec282 (patch) | |
tree | 01464b5e2a731b70285c32ba8fbec592b6119369 | |
parent | 8787c5417091be638f1b51d0cb7b452ef2a82565 (diff) |
-rwxr-xr-x | lib/mysql-functions | 8 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index 0625616..a1e5a64 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -863,15 +863,17 @@ mysql_cleanup() { fi printf ' WHERE `build_slaves`.`currently_building` IS NOT NULL' printf ' AND TIMEDIFF(NOW(),`build_slaves`.`last_connection`) > "1:00:00";\n' - # remove `logged_lines` from buildslaves without an assignment + # remove `last_action` and `logged_lines` from buildslaves without an assignment if [ "${operator}" = 'DELETE' ]; then printf 'UPDATE `build_slaves`' - printf ' SET `build_slaves`.`logged_lines`=NULL' + printf ' SET `build_slaves`.`last_action`=NULL,' + printf ' `build_slaves`.`logged_lines`=NULL' else printf 'SELECT COUNT(*) FROM `build_slaves`' fi printf ' WHERE `build_slaves`.`currently_building` IS NULL' - printf ' AND `build_slaves`.`logged_lines` IS NOT NULL;\n' + printf ' AND (`build_slaves`.`last_action` IS NOT NULL' + printf ' OR `build_slaves`.`logged_lines` IS NOT NULL);\n' for partition in $(seq 0 $((mysql_files_table_partitions-1))); do # remove obsolete file_providers printf '%s FROM `file_providers` PARTITION (p%s)' \ |