Skip to content

Commit 0588d8c

Browse files
committed
DS-2252: LambdaBasedStep - Unregister StateCheckTrigger if StateMachine is not running/existing anymore.
Signed-off-by: mchrza <maximilian.chrzan@here.com>
1 parent ed66dce commit 0588d8c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/execution/LambdaBasedStep.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,14 @@ private void checkAsyncExecutionState() {
278278
logger.warn("Unknown execution state for step {}", getGlobalStepId(), e);
279279

280280
//Check if the StateMachine is still existing and if it is RUNNING. If not - unregister StateCheckTrigger.
281-
ExecutionStatus sfnExecutionStatus;
282281
try {
283-
sfnExecutionStatus = SFNInspector.getSFNExecutionStatus(executionId);
282+
ExecutionStatus sfnExecutionStatus = SFNInspector.getSFNExecutionStatus(executionId);
283+
if(sfnExecutionStatus != ExecutionStatus.RUNNING)
284+
unregisterStateCheckTrigger();
284285
}catch (ExecutionDoesNotExistException e1){
285286
logger.info("[{}] StateMachine already gone ...", getGlobalStepId());
286-
sfnExecutionStatus = ExecutionStatus.FAILED;
287-
}
288-
289-
if(sfnExecutionStatus != ExecutionStatus.RUNNING)
290287
unregisterStateCheckTrigger();
288+
}
291289

292290
synchronizeStep();
293291
//NOTE: No heartbeat must be sent to SFN in this case!

0 commit comments

Comments
 (0)