\Imi\Cron\TaskCronTask

Summary

Methods
Properties
Constants
handle()
finish()
No public properties found
No constants found
reportCronResult()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

handle()

handle(\Imi\Task\TaskParam  $param, \Swoole\Server  $server, integer  $taskId, integer  $workerId) : mixed

任务处理方法,返回的值会通过 finish 事件推送给 worker 进程

Parameters

\Imi\Task\TaskParam $param
\Swoole\Server $server
integer $taskId
integer $workerId

Returns

mixed

finish()

finish(\Swoole\Server  $server, integer  $taskId, mixed  $data) : void

任务结束时触发

Parameters

\Swoole\Server $server
integer $taskId
mixed $data

reportCronResult()

reportCronResult(string  $id, boolean  $success, string  $message) : void

上报定时任务结果

Parameters

string $id
boolean $success
string $message