Skip to content

Commit 65c062e

Browse files
committed
DHFPROD-2461: reset runningFlow when flow has 'completed'
1 parent a0e4801 commit 65c062e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

marklogic-data-hub/src/main/java/com/marklogic/hub/flow/impl/FlowRunnerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ else if (!isJobSuccess.get()) {
384384
stepsMap.remove(jobId);
385385
flowMap.remove(jobId);
386386
flowResp.remove(runningJobId);
387+
runningFlow = null;
387388
if (!jobQueue.isEmpty()) {
388389
initializeFlow((String) jobQueue.peek());
389390
} else {
@@ -435,6 +436,7 @@ public void afterExecute(Runnable r, Throwable t) {
435436
//Run the next queued flow if stop-on-error is set or if the step queue is empty
436437
if(((FlowRunnerTask)r).getStepQueue().isEmpty() || runningFlow.isStopOnError()) {
437438
jobQueue.remove();
439+
runningFlow = null;
438440
if (!jobQueue.isEmpty()) {
439441
initializeFlow((String) jobQueue.peek());
440442
} else {

0 commit comments

Comments
 (0)