File tree 3 files changed +9
-6
lines changed
src/main/java/org/jenkinsci/plugins/workflow
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 83
83
<scope >import</scope >
84
84
<type >pom</type >
85
85
</dependency >
86
+ <!-- TODO until in BOM: -->
87
+ <dependency >
88
+ <groupId >org.jenkins-ci.plugins.workflow</groupId >
89
+ <artifactId >workflow-step-api</artifactId >
90
+ <version >686.v603d058a_e148</version >
91
+ </dependency >
86
92
</dependencies >
87
93
</dependencyManagement >
88
94
<dependencies >
Original file line number Diff line number Diff line change @@ -762,12 +762,11 @@ private static class HandlerImpl extends Handler {
762
762
763
763
private void check (Computer c ) {
764
764
String name = c .getName ();
765
- StepExecution .applyAll (Execution .class , exec -> {
765
+ StepExecution .acceptAll (Execution .class , exec -> {
766
766
if (exec .watching && exec .node .equals (name )) {
767
767
LOGGER .fine (() -> "Online/offline event on " + name + ", checking current status of " + exec .remote + " soon" );
768
768
threadPool ().schedule (exec ::check , 15 , TimeUnit .SECONDS );
769
769
}
770
- return null ;
771
770
});
772
771
}
773
772
Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ public void stop(@NonNull Throwable cause) throws Exception {
331
331
}
332
332
Set <StepContext > newAnomalous = new HashSet <>();
333
333
Set <String > affectedNodes = new HashSet <>();
334
- StepExecution .applyAll (ExecutorStepExecution .class , exec -> {
334
+ StepExecution .acceptAll (ExecutorStepExecution .class , exec -> {
335
335
StepContext ctx = exec .getContext ();
336
336
if (!knownTasks .contains (ctx )) {
337
337
LOGGER .warning (() -> "do not know about " + ctx );
@@ -351,11 +351,10 @@ public void stop(@NonNull Throwable cause) throws Exception {
351
351
} else {
352
352
LOGGER .fine (() -> "know about " + ctx );
353
353
}
354
- return null ;
355
354
}).get ();
356
355
// Also abort any shell steps running on the same node(s):
357
356
if (!affectedNodes .isEmpty ()) {
358
- StepExecution .applyAll (DurableTaskStep .Execution .class , exec -> {
357
+ StepExecution .acceptAll (DurableTaskStep .Execution .class , exec -> {
359
358
if (affectedNodes .contains (exec .node )) {
360
359
StepContext ctx = exec .getContext ();
361
360
try {
@@ -365,7 +364,6 @@ public void stop(@NonNull Throwable cause) throws Exception {
365
364
}
366
365
ctx .onFailure (new FlowInterruptedException (Result .ABORTED , false , new RemovedNodeCause ()));
367
366
}
368
- return null ;
369
367
});
370
368
}
371
369
for (StepContext ctx : newAnomalous ) {
You can’t perform that action at this time.
0 commit comments