Fixes #140.
AGNPN3WHGRYVVTCTLFQDHSSSGRKWAP6N5QMO6MFK6CHRF4IVUKEQC
SLBM7H4QGAX5J25YXYZL7APK5Y3TSB4KSWCEJPF3X3KF7UG7Y3GQC
WZ3AEJ67LOG5L335AAC2BDLIJPIU4VSCGBMATBHDZC26ECRS5A6AC
KJQWSRCCQEKF64L4NYYZ7VKAF2YEPYXXTRW6BI464P6Q6KU34TQAC
4X6NS66QDWR4S4ZZFKN2QOJQII5ZYIMTDYRHK25N6NJSROVLHJ6QC
MUBBWJPAEREQVNWR7BYMGWLFKHY2LZBNLZKHT2WT6PVNSM2PFX2QC
I3X25POIIRIY47QTN2PA3WMDVROM6TLFJAV3Q5W6AU526TFPNHKAC
KNAVU6BHK77BDJBQKRQ2G2MVULWIVNVU4NYIA76OBVVILFOU7FAQC
print STDERR "*** looking for the most recent successful builds of current jobs in ",
$project->name, ":", $jobset->name, "\n";
# Keep the most recently succeeded build of a current job. Oh
# I really need to stop using DBIx::Class.
keepBuild($_, 1) foreach $jobset->builds->search(
{ id => { -in => $jobset->builds->search(
{ finished => 1
, buildstatus => [0, 6]
, job => { -in => $jobset->builds->search(
{ eval => { -in => [@evals] } },
{ select => "job", distinct => 1, join => "jobsetevalmembers" }
)->as_query }
},
{ group_by => 'job'
, select => [ { max => 'id', -as => 'm' } ]
})->as_query }
},
{ columns => [ @columns ] });