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:
@ -1039,7 +1039,6 @@ sub restartBuild {
|
||||
|
||||
$build->update(
|
||||
{ finished => 0
|
||||
, timestamp => time
|
||||
, busy => 0
|
||||
, locker => ""
|
||||
, iscachedbuild => 0
|
||||
|
@ -28,7 +28,7 @@ our @EXPORT = qw(
|
||||
|
||||
|
||||
# Columns from the Builds table needed to render build lists.
|
||||
Readonly our @buildListColumns => ('id', 'finished', 'timestamp', 'project', 'jobset', 'job', 'nixname', 'system', 'priority', 'busy', 'buildstatus', 'releasename');
|
||||
Readonly our @buildListColumns => ('id', 'finished', 'timestamp', 'stoptime', 'project', 'jobset', 'job', 'nixname', 'system', 'priority', 'busy', 'buildstatus', 'releasename');
|
||||
|
||||
|
||||
sub getBuild {
|
||||
|
@ -100,7 +100,7 @@ sub allPrimaryBuilds {
|
||||
my ($project, $primaryJob) = @_;
|
||||
my $allPrimaryBuilds = $project->builds->search(
|
||||
{ jobset => $primaryJob->get_column('jobset'), job => $primaryJob->get_column('job'), finished => 1 },
|
||||
{ order_by => "timestamp DESC"
|
||||
{ order_by => "id DESC"
|
||||
, where => \ attrsToSQL($primaryJob->attrs, "me.id")
|
||||
});
|
||||
return $allPrimaryBuilds;
|
||||
@ -153,7 +153,7 @@ sub findLastJobForBuilds {
|
||||
, job => $job->get_column('job'), finished => 1
|
||||
},
|
||||
{ rows => 1
|
||||
, order_by => ["buildstatus", "timestamp"]
|
||||
, order_by => ["buildstatus", "id"]
|
||||
, where => \ attrsToSQL($job->attrs, "build.id")
|
||||
})
|
||||
unless defined $thisBuild;
|
||||
|
Reference in New Issue
Block a user