Skip to content

Commit

Permalink
fix: operations associated with incorrect ID when tasks are rescheduled
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Dec 26, 2023
1 parent adbe005 commit 25871c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/orchestrator/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func (t *TaskWithOperation) runWithOpAndContext(ctx context.Context, do func(ctx

t.running.Store(true)
defer t.running.Store(false)
defer func() {
t.op = nil
}()

return WithOperation(t.orch.OpLog, t.op, func() error {
return do(ctx, t.op)
Expand Down

0 comments on commit 25871c9

Please sign in to comment.