summaryrefslogtreecommitdiff
path: root/bin/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-12 22:02:43 +0100
committerErich Eckner <git@eckner.net>2018-02-12 22:02:43 +0100
commita117834a6497ca868caa3943dd7275ad532e9d5a (patch)
tree7ebcd9d7aadf8de98ef7c3bd23e3dc10ab8f4bfc /bin/mysql-functions
parent1378f7609b70ed44926ed7a19822fe7c630e20be (diff)
downloadbuilder-a117834a6497ca868caa3943dd7275ad532e9d5a.tar.xz
bin/mysql-functions: remove handed out build-assignments which are not on the build-list
Diffstat (limited to 'bin/mysql-functions')
-rwxr-xr-xbin/mysql-functions6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/mysql-functions b/bin/mysql-functions
index 4b76d64..491b794 100755
--- a/bin/mysql-functions
+++ b/bin/mysql-functions
@@ -809,7 +809,11 @@ mysql_cleanup() {
printf 'SELECT * FROM `build_assignments` '
printf 'WHERE `build_assignments`.`package_source`=`package_sources`.`id`'
printf ');\n'
- # TODO: remove handed out build-assignments which are not on the build-list
+ printf 'UPDATE `build_slaves`'
+ printf ' JOIN `binary_packages` ON `build_slaves`.`currently_building`=`binary_packages`.`build_assignment`'
+ printf ' JOIN `repositories` ON `repositories`.`id`=`binary_packages`.`repository`'
+ printf ' SET `currently_building`=NULL'
+ printf ' WHERE `repositories`.`name`!="build-list";\n'
} | \
${mysql_command}
}