SystemTaskHandler executes a claimed task of a specific type. Run owns the task lifecycle from claim to terminal state: it MUST call model.FinishSystemTask (succeeded/failed) before returning and MUST honor ctx cancellation, which the runner triggers if the per-type lock is lost.
| 32 | // model.FinishSystemTask (succeeded/failed) before returning and MUST honor |
| 33 | // ctx cancellation, which the runner triggers if the per-type lock is lost. |
| 34 | type SystemTaskHandler interface { |
| 35 | Type() string |
| 36 | Run(ctx context.Context, task *model.SystemTask, runnerID string) |
| 37 | } |
| 38 | |
| 39 | // ScheduledSystemTaskHandler is a SystemTaskHandler that the scheduler also |
| 40 | // creates periodically when enabled and the configured interval has elapsed |
no outgoing calls
no test coverage detected