diff options
author | Erich Eckner <git@eckner.net> | 2019-05-03 08:36:05 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-03 08:36:05 +0200 |
commit | c029ba59be3c1934a54e874a4b3e33e4ff89ea42 (patch) | |
tree | bcb1d81b96b972e0f302f3d79ed3dde5018d3dc7 /bin/get-assignment | |
parent | 7491cdc429f3d0a357594a74b1aaeca451932fd4 (diff) | |
download | builder-c029ba59be3c1934a54e874a4b3e33e4ff89ea42.tar.xz |
bin/get-assignment: order by "was built the least times" instead of "was built the longest time ago" (4th "digit")
Diffstat (limited to 'bin/get-assignment')
-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`' |