GearmanJob::unique
(PECL gearman >= 0.5.0)
GearmanJob::unique — Get the unique identifier
説明
Returns the unique identifier for this job. The identifier is assigned by the client.
パラメータ
この関数にはパラメータはありません。
戻り値
An opaque unique identifier, or false
if the job has not yet been initialized.
参考
- GearmanClient::do() - Run a single task and return a result [deprecated]
- GearmanTask::uuid() - Get the unique identifier for a task (deprecated)
+add a note
User Contributed Notes 1 note
ben dot paulsen at myedu dot com ¶
13 years ago
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);
?>
↑ and ↓ to navigate •
Enter to select •
Esc to close
Press Enter without
selection to search using Google