index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-10-23 13:13:53 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-23 13:13:53 +0200 |
commit | 0270dddb465d967528873b88eb15116216b10092 (patch) | |
tree | d50389f8f83fb5e8475ac442a86e14cc3df7ac4a /bin/prioritize-build-list | |
parent | d6eb55cf248c13d4acb9563d2e770e7b3c8c7c7a (diff) |
-rwxr-xr-x | bin/prioritize-build-list | 13 |
diff --git a/bin/prioritize-build-list b/bin/prioritize-build-list index 5e815bc..2492d54 100755 --- a/bin/prioritize-build-list +++ b/bin/prioritize-build-list @@ -102,7 +102,7 @@ verbose_flock ${wait_for_lock} 8 printf 'UPDATE `build_assignments`' printf ' JOIN (' printf 'SELECT' - printf ' `s_ba`.`id`,' + printf ' `s_ba`.`id` AS `build_assignment`,' printf 'MAX(`g_ba`.`priority`) AS `priority`' printf ' FROM `build_assignments` AS `g_ba`' mysql_join_build_assignments_binary_packages 'g_ba' 'g_bp' @@ -119,12 +119,11 @@ verbose_flock ${wait_for_lock} 8 "${repository_ids__any_build_list}" mysql_join_binary_packages_build_assignments 's_bp' 's_ba' printf ' GROUP BY `s_ba`.`id`' - printf ') AS `s_ba`' - printf ' ON `s_ba`.`id`=`build_assignments`.`id`' - printf ' SET `build_assignments`.`priority`=GREATEST(' - printf '`s_ba`.`priority`,' - printf '`build_assignments`.`priority`' - printf ');\n' + printf ') AS `sub_q`' + printf ' ON `sub_q`.`build_assignment`=`build_assignments`.`id`' + printf ' SET `build_assignments`.`priority`=`sub_q`.`priority`' + printf ' WHERE `build_assignments`.`priority`<`sub_q`.`priority`' + printf ';\n' printf 'SELECT row_count();\n' fi } | \ |