diff options
-rwxr-xr-x | bin/get-assignment | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/get-assignment b/bin/get-assignment index 4b95775..f6491fc 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -203,7 +203,7 @@ done # 1: we requested it # 2: tool chain priority # 3: its priority -# 4: was built the longest time ago +# 4: was built the least times # 5: architecture matches # 6: is part of a loop # 7: has the oldes package source @@ -374,7 +374,7 @@ next_building=$( printf ' LEFT JOIN (' printf 'SELECT' printf ' `failed_builds`.`build_assignment`,' - printf 'MAX(`failed_builds`.`date`) AS `date`' + printf 'COUNT(DISTINCT `failed_builds`.`id`) AS `count`' printf ' FROM `failed_builds`' printf ' GROUP BY `failed_builds`.`build_assignment`' printf ') AS `latest_failed_builds`' @@ -464,7 +464,7 @@ next_building=$( # 2: not in toolchain printf 'IFNULL(`toolchain_query`.`priority`,2),' printf '`build_assignments`.`priority` DESC,' - printf 'IFNULL(`latest_failed_builds`.`date`,0),' + printf 'IFNULL(`latest_failed_builds`.`count`,0),' printf 'IF(`architectures`.`id`=`build_assignments`.`architecture`,1,0) DESC,' printf 'IF(' mysql_query_is_part_of_loop '`build_assignments`.`id`' |