Skip to content

Commit aac9e29

Browse files
authored
Merge pull request #39 from makasim/delay-paused-fix
delay resume if state was paused
2 parents dd87db6 + 947f4e9 commit aac9e29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd_delay.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ func (cmd *DelayCommand) Prepare() error {
4444
ToID: delayedStateCtx.Current.Transition.ToID,
4545
Annotations: nil,
4646
}
47+
48+
if Paused(delayedStateCtx.Current) {
49+
nextTs.SetAnnotation(StateAnnotation, `resumed`)
50+
}
51+
4752
nextTs.SetAnnotation(DelayAtAnnotation, time.Now().Format(time.RFC3339Nano))
4853
nextTs.SetAnnotation(DelayDurationAnnotation, cmd.Duration.String())
4954
nextTs.SetAnnotation(DelayCommitAnnotation, fmt.Sprintf("%v", cmd.Commit))

0 commit comments

Comments
 (0)