MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / SetRetry

Method SetRetry

internal/task/base.go:68–80  ·  view source on GitHub ↗
(retry int, maxRetry int)

Source from the content-addressed store, hash-verified

66}
67
68func (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
82type TaskExtensionInfo interface {
83 tache.TaskWithInfo

Callers

nothing calls this directly

Calls 2

SetCtxMethod · 0.95
DoneMethod · 0.45

Tested by

no test coverage detected