From a03d072cc472de7d2707b97079335d17025bd475 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 1 Feb 2018 14:14:05 +0100 Subject: bin/get-assignment: honor `priority` of `build_assignments` --- bin/get-assignment | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/get-assignment') diff --git a/bin/get-assignment b/bin/get-assignment index 48e8d53..0c7915d 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -144,6 +144,7 @@ next_building=$( printf '%s' "$1" | \ base64 -w0 )" + printf '`build_assignments`.`priority`,' printf '(' printf 'SELECT COUNT(*)' printf ' FROM `failed_builds`' @@ -173,14 +174,14 @@ next_building=$( printf ' OR NOT ' mysql_query_has_pending_dependencies '`build_assignments`.`id`' printf ')' - printf ' ORDER BY `requested` DESC, `trials`, `part_of_loop`, `build_assignments`.`id`' + printf ' ORDER BY `requested` DESC, `priority` DESC, `trials`, `part_of_loop`, `build_assignments`.`id`' printf ' LIMIT 1;\n' } | \ ${mysql_command} --batch --raw | \ sed ' 1d y/\t/ / - s/^\(\S\+ \)\{3\}// + s/^\(\S\+ \)\{4\}// ' ) if [ -n "${next_building}" ]; then -- cgit v1.2.3-54-g00ecf