GearmanWorker::setId
(No version information available, might only be in SVN)
GearmanWorker::setId — Définit un identifiant au worker
Description
public bool GearmanWorker::setId
( string
$id
)Assigne au worker un identifiant, permettant ainsi qu'il soit identifiable lorsque gearmand demande la liste des workers disponibles.
Liste de paramètres
-
id -
Un identifiant.
Valeurs de retour
Cette fonction retourne TRUE en cas de
succès ou FALSE si une erreur survient.
Exemples
Exemple #1 Exemple avec GearmanWorker::setId()
<?php
$worker= new GearmanWorker();
$worker->setId('test');
?>L'exemple ci-dessus va afficher quelque chose de similaire à :
Run the following command: gearadmin --workers Output: 30 ::3a3a:3361:3361:3a33%976303667 - : test
