GearmanJob::unique

(PECL gearman >= 0.5.0)

GearmanJob::uniqueObtém o identificador exclusivo

Descrição

public GearmanJob::unique(): false|string

Retorna o identificador exclusivo para este trabalho. O identificador é atribuído pelo cliente.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Um identificador exclusivo opaco ou false se o trabalho ainda não foi inicializado.

Veja Também

adicione uma nota

Notas Enviadas por Usuários (em inglês) 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);
?>
To Top