PHP 8.3.4 Released!

GearmanJob::unique

(PECL gearman >= 0.5.0)

GearmanJob::uniqueRécupère l'identifiant unique

Description

public GearmanJob::unique(): false|string

Retourne l'identifiant unique pour ce travail. L'identifiant est assigné par le client.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

L'identifiant unique, ou false si le travail n'a pas été initialisé.

Voir aussi

add a note

User Contributed Notes 1 note

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