MCPcopy Create free account
hub / github.com/devfeel/dottask / RunOnce

Method RunOnce

taskinfo.go:86–89  ·  view source on GitHub ↗

RunOnce do task only once no match Express or Interval no recover panic support for #6 新增RunOnce方法建议

()

Source from the content-addressed store, hash-verified

84// no recover panic
85// support for #6 新增RunOnce方法建议
86func (task *TaskInfo) RunOnce() error {
87 err := task.handler(task.getTaskContext())
88 return err
89}
90
91func (task *TaskInfo) getTaskContext() *TaskContext {
92 ctx := task.taskService.contextPool.Get().(*TaskContext)

Callers

nothing calls this directly

Calls 1

getTaskContextMethod · 0.95

Tested by

no test coverage detected