Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-01 14:14:05 +0100
committerErich Eckner <git@eckner.net>2018-02-01 14:14:05 +0100
commita03d072cc472de7d2707b97079335d17025bd475 (patch)
tree92437891e6b650e53789df52cc573a9c769b7473 /bin
parenteec7bff763e119a05b3b16c2c1e7477eb381f86a (diff)
bin/get-assignment: honor `priority` of `build_assignments`
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-assignment5
1 files changed, 3 insertions, 2 deletions
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