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

Method RunOnce

looptask.go:82–85  ·  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

80// no recover panic
81// support for #6 新增RunOnce方法建议
82func (task *LoopTask) RunOnce() error {
83 err := task.handler(task.getTaskContext())
84 return err
85}
86
87// NewLoopTask create new loop task
88func NewLoopTask(taskID string, isRun bool, dueTime int64, interval int64, handler TaskHandle, taskData interface{}) (Task, error) {

Callers

nothing calls this directly

Calls 1

getTaskContextMethod · 0.80

Tested by

no test coverage detected