File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -195,5 +195,13 @@ sub all_builds : Chained('evalChain') PathPart('builds') Args(0) {
195
195
);
196
196
}
197
197
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
+ }
198
206
199
207
1;
Original file line number Diff line number Diff line change @@ -279,8 +279,18 @@ sub _buildFinished {
279
279
280
280
sub buildFinished {
281
281
my ($self , $topbuild , $dependents ) = @_ ;
282
+
283
+
284
+ # tracking builds we have triggered, as for failed jobs, original build can be in dependents
285
+ my @builds = ();
282
286
foreach my $build ($topbuild , @{$dependents }) {
283
- _buildFinished($self , $build )
287
+ my $id = $build -> id;
288
+ if (grep (/ ^$id / , @builds )) {
289
+ print STDERR " Skipped $id , already triggered.\n " ;
290
+ } else {
291
+ _buildFinished($self , $build );
292
+ push (@builds , $id );
293
+ }
284
294
}
285
295
}
286
296
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ while (!$queued_only) {
129
129
my $channelName = $message -> {" channel" };
130
130
my $pid = $message -> {" pid" };
131
131
my $payload = $message -> {" payload" };
132
+ print STDERR " Received: $channelName = [$payload ]\n " ;
132
133
133
134
$prom -> inc(" notify_event" , { channel => $channelName });
134
135
You can’t perform that action at this time.
0 commit comments