PHP 5.6.16 is available



(PECL gearman >= 0.5.0)

GearmanTask::jobHandle -- gearman_job_handleGet the job handle


public string GearmanTask::jobHandle ( void )

Returns the job handle for this task.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

The opaque job handle.

Vedere anche:

add a note add a note

User Contributed Notes 1 note

chris at cmbuckley dot co dot uk
2 years ago
The job handle is not assigned until the task is received and queued by the job server, so you will need to use one of the client callbacks to access the handle:

->setCreatedCallback(function ($task) {
var_dump($task->jobHandle()); // "H:server:1"
$task = $client->addTask('function', 'workload');
var_dump($task->jobHandle()); // ""
To Top