index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-05 10:01:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-05 10:01:12 +0200 |
commit | 548ddb5ec85ea7474a213ca065939fc2b8553f5e (patch) | |
tree | 498bc9e5e2cda45d30e5557ab3e878b6cf6ea54b | |
parent | 8118c8c71b9a0ede8980584bd69c98c4f4db4e8f (diff) |
-rwxr-xr-x | bin/get-assignment | 16 |
diff --git a/bin/get-assignment b/bin/get-assignment index c8fcbaf..af86ea1 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -34,10 +34,10 @@ hand_out_assignment() { mysql_join_package_sources_build_assignments mysql_join_build_assignments_binary_packages mysql_join_binary_packages_binary_packages_in_repositories - mysql_join_binary_packages_in_repositories_repositories - printf ' WHERE `repositories`.`name`="build-list"' - printf ' AND `build_assignments`.`id`=from_base64("%s")' \ - "$(printf '%s' "$1" | base64 -w0)" + printf ' WHERE `binary_packages_in_repositories`.`repository`=%s' \ + "${repository_ids__any_build_list}" + printf ' AND `build_assignments`.`id`=%s' \ + "$1" printf ' LIMIT 1;\n' } | \ mysql_run_query | \ @@ -46,16 +46,16 @@ hand_out_assignment() { # shellcheck disable=SC2016 { printf 'UPDATE `build_slaves`' - printf ' SET `currently_building` = from_base64("%s")' \ - "$(printf '%s' "$1" | base64 -w0)" + printf ' SET `currently_building`=%s' \ + "$1" # shellcheck disable=SC2154 printf ' WHERE `build_slaves`.`id`=from_base64("%s");\n' \ "$(printf '%s' "${slave_id}" | base64 -w0)" printf 'UPDATE `build_assignments`' printf ' SET `build_assignments`.`priority`=0' - printf ' WHERE `build_assignments`.`id`=from_base64("%s");\n' \ - "$(printf '%s' "${slave_id}" | base64 -w0)" + printf ' WHERE `build_assignments`.`id`=%s;\n' \ + "$1" } | \ mysql_run_query |