fix: operations associated with incorrect ID when tasks are rescheduled

This commit is contained in:
Gareth George
2023-12-26 08:33:40 +00:00
parent fc19a6cea8
commit 37e000a53e
+3
View File
@@ -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)