|
GearmanClient::addTaskStatusAdd a task to get status Description
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). Parameters
Return Values
A GearmanTask object or 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.
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
|