summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-24 13:11:21 +0200
committerErich Eckner <git@eckner.net>2019-06-24 13:14:01 +0200
commitecd7c64b744a7b19efcb38a5af595bfc009bf372 (patch)
tree902b96710ac34b461a8ae7f08ce157217c93a7bf
parent70ea93947fb2c9c3a799d7319f45dec5aab4415c (diff)
downloadbuilder-ecd7c64b744a7b19efcb38a5af595bfc009bf372.tar.xz
bin/get-assignment: the most abundand build slaves should get all kind of architectures early
-rwxr-xr-xbin/get-assignment8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 3a24c76..462d2c7 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -204,7 +204,7 @@ done
# 2: tool chain priority
# 3: its priority
# 4: was built the least times
-# 5: architecture matches
+# 5: architecture matches (or the slave is from the majority architecture)
# 6: is part of a loop
# 7: has the oldes package source
# 8: build_assignment id
@@ -480,7 +480,11 @@ next_building=$(
printf 'IFNULL(`toolchain_query`.`priority`,2),'
printf '`build_assignments`.`priority` DESC,'
printf 'IFNULL(`latest_failed_builds`.`count`,0),'
- printf 'IF(`architectures`.`id`=`build_assignments`.`architecture`,1,0) DESC,'
+ printf 'IF('
+ printf '`architectures`.`id`=%s' \
+ "$(mysql_determine_majority_build_slave_architecture_id)"
+ printf ' OR `architectures`.`id`=`build_assignments`.`architecture`,'
+ printf '1,0) DESC,'
printf 'IF('
mysql_query_is_part_of_loop '`build_assignments`.`id`'
printf ',1,0),'