GearmanJob::unique

(PECL gearman >= 0.5.0)

GearmanJob::uniqueGet the unique identifier

说明

public GearmanJob::unique(): false|string

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.

参见

添加备注

用户贡献的备注 1 note

up
5
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);
?>

备份地址:http://www.lvesu.com/blog/php/gearmanjob.unique.php

136869282
000-0000-0000
000-0000-0000
banyueyu@foxmail.com