略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: GearmanJob::unique

2024-12-21

GearmanJob::unique

(PECL gearman >= 0.5.0)

GearmanJob::uniqueGet the unique identifier

说明

public GearmanJob::unique(): string

Returns the unique identifier for this job. The identifier is assigned by the client.

参数

此函数没有参数。

返回值

An opaque unique identifier.

参见

add a noteadd a note

User Contributed Notes 1 note

up
5
ben dot paulsen at myedu dot com
10 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);
?>

官方地址:https://www.php.net/manual/en/gearmanjob.unique.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3