Let Builds.timestamp refer to the time the build was added
Previously, for scheduled builds, "timestamp" contained the time the build was added to the queue, while for finished builds, it was the time the build finished. Now it's always the former.
This commit is contained in:
@ -54,7 +54,6 @@ sub failDependents {
|
||||
$d->update(
|
||||
{ finished => 1
|
||||
, logfile => ''
|
||||
, timestamp => time # !!! Why change the timestamp?
|
||||
, iscachedbuild => 0
|
||||
, buildstatus => $drvPath eq $d->drvpath ? 1 : 2
|
||||
, starttime => $time
|
||||
@ -307,7 +306,6 @@ sub doBuild {
|
||||
, busy => 0
|
||||
, locker => ''
|
||||
, logfile => ''
|
||||
, timestamp => time # !!! Why change the timestamp?
|
||||
, iscachedbuild => $isCachedBuild
|
||||
, buildstatus => $buildStatus
|
||||
, starttime => $startTime
|
||||
|
@ -100,7 +100,7 @@ sub checkBuilds {
|
||||
# Select the highest-priority builds to start.
|
||||
my @builds = $extraAllowed == 0 ? () : $db->resultset('Builds')->search(
|
||||
{ finished => 0, busy => 0, system => $system->system, enabled => 1 },
|
||||
{ join => ['project'], order_by => ["priority DESC", "timestamp"],
|
||||
{ join => ['project'], order_by => ["priority DESC", "id"],
|
||||
rows => $extraAllowed });
|
||||
|
||||
if (scalar(@builds) > 0) {
|
||||
|
Reference in New Issue
Block a user