Method
SetRetry
(retry int, maxRetry int)
Source from the content-addressed store, hash-verified
| 66 | } |
| 67 | |
| 68 | func (t *TaskExtension) SetRetry(retry int, maxRetry int) { |
| 69 | t.Base.SetRetry(retry, maxRetry) |
| 70 | if retry > 0 || !conf.Conf.Tasks.AllowRetryCanceled || t.Ctx() == nil { |
| 71 | return |
| 72 | } |
| 73 | select { |
| 74 | case <-t.Ctx().Done(): |
| 75 | ctx, cancel := context.WithCancel(context.Background()) |
| 76 | t.SetCtx(ctx) |
| 77 | t.SetCancelFunc(cancel) |
| 78 | default: |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | type TaskExtensionInfo interface { |
| 83 | tache.TaskWithInfo |
Callers
nothing calls this directly
Tested by
no test coverage detected