(No version information available, might only be in Git)
GearmanWorker::setId — Définit un identifiant au worker
$id
) : boolAssigne au worker un identifiant, permettant ainsi qu'il soit identifiable lorsque gearmand demande la liste des workers disponibles.
idUn identifiant.
Cette fonction retourne TRUE en cas de succès ou FALSE si une erreur survient.
Exemple #1 Exemple avec GearmanWorker::setId()
Définit un identifiant à un worker simple.
<?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