clear_queue_non_current: Don't use isCurrent
This commit is contained in:
parent
46f8b25c1f
commit
a9c6f522e6
|
@ -35,7 +35,11 @@ sub machines : Chained('admin') PathPart('machines') Args(0) {
|
||||||
sub clear_queue_non_current : Chained('admin') PathPart('clear-queue-non-current') Args(0) {
|
sub clear_queue_non_current : Chained('admin') PathPart('clear-queue-non-current') Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
my $time = time();
|
my $time = time();
|
||||||
$c->model('DB::Builds')->search({finished => 0, iscurrent => 0, busy => 0})->update({ finished => 1, buildstatus => 4, starttime => $time, stoptime => $time });
|
$c->model('DB::Builds')->search(
|
||||||
|
{ finished => 0, busy => 0
|
||||||
|
, id => { -not_in => \ "select build from JobsetEvalMembers where eval in (select max(id) from JobsetEvals where hasNewBuilds = 1 group by project, jobset)" }
|
||||||
|
}, {})
|
||||||
|
->update({ finished => 1, buildstatus => 4, starttime => $time, stoptime => $time });
|
||||||
$c->res->redirect($c->request->referer // "/admin");
|
$c->res->redirect($c->request->referer // "/admin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue