mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-08-29 12:26:32 +00:00
fix: operations associated with incorrect ID when tasks are rescheduled
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user