|
GearmanClient::addTaskStatusAdd a task to get status 説明
public GearmanTaskfalse GearmanClient::addTaskStatus(string
$job_handle , mixed $context = null )Used to request status information from the Gearman server, which will call the specified status callback (set using GearmanClient::setStatusCallback). パラメータ
戻り値
A GearmanTask object or 例
例1 Monitor completion of multiple background tasks An artificial delay is introduced in the worker in this example to simulate a long running process. There is only one worker running for this example.
上の例の出力は、 たとえば以下のようになります。 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 2 参考
|