From ecd7c64b744a7b19efcb38a5af595bfc009bf372 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 24 Jun 2019 13:11:21 +0200 Subject: bin/get-assignment: the most abundand build slaves should get all kind of architectures early --- bin/get-assignment | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin/get-assignment') 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),' -- cgit v1.2.3