Skip to content

Commit 3a9fa1b

Browse files
authored
Merge pull request #70 from cschleiden/workflow-task-error
Transition workflow to error when encountering error during replay
2 parents 72d3fae + 08678ae commit 3a9fa1b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/workflow/executor.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ func (e *executor) ExecuteTask(ctx context.Context, t *task.Workflow) (*Executio
8383
// Fail workflow with an error. Skip executing new events, but still go through the commands
8484
e.workflowCompleted(nil, err)
8585
skipNewEvents = true
86-
}
87-
88-
if t.LastSequenceID != e.lastSequenceID {
86+
} else if t.LastSequenceID != e.lastSequenceID {
8987
return nil, errors.New("even after fetching history and replaying history executor state does not match task")
9088
}
9189
} else if t.LastSequenceID < e.lastSequenceID {

0 commit comments

Comments
 (0)