|
GearmanClient::addTaskStatusAdd a task to get status Description
public GearmanTask GearmanClient::addTaskStatus
( string
$job_handle
[, string &$context
] )Used to request status information from the Gearman server, which will call the specified status callback (set using GearmanClient::setStatusCallback). Parameters
Return ValuesA GearmanTask object. Examples
Example #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.
<?php The above example will output something similar to: 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 See Also
|