I think it's worth noting that this function will not return the unique id specified by a client request unless GEARMAN_WORKER_GRAB_UNIQ is specified as an option to the worker instance as follows ...
<?php
$worker= new GearmanWorker();
$worker->addServer();
$worker->addOptions(GEARMAN_WORKER_GRAB_UNIQ);
?>
GearmanJob::unique
(PECL gearman >= 0.5.0)
GearmanJob::unique — Get the unique identifier
Opis
public string GearmanJob::unique
( void
)
Returns the unique identifiter for this job. The identifier is assigned by the client.
Parametry
Ta funkcja nie posiada parametrów.
Zwracane wartości
An opaque unique identifier.
Zobacz też:
- GearmanClient::do() - Run a single task and return a result [deprecated]
- GearmanTask::uuid() - Get the unique identifier for a task (deprecated)
ben dot paulsen at myedu dot com ¶
1 year ago
