Skip to content

Commit 1180136

Browse files
committed
Add /eval/<id>/finished endpoint
1 parent a2004ca commit 1180136

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib/Hydra/Controller/JobsetEval.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,13 @@ sub all_builds : Chained('evalChain') PathPart('builds') Args(0) {
195195
);
196196
}
197197

198+
sub finished : Chained('evalChain') PathPart('finished') Args(0) {
199+
my ($self, $c) = @_;
200+
my $notFinished = $c->stash->{eval}->builds->search({ finished => 0 })->count;
201+
$self->status_ok(
202+
$c,
203+
entity => $notFinished == 0 ? 1 : 0,
204+
);
205+
}
198206

199207
1;

0 commit comments

Comments
 (0)