GearmanClient has a default timeout of -1 you need to set this to a positive number using setTimeout to avoid cases where your script waits forever to run a job even if there are no workers running at all.
GearmanClient::setTimeout
(PECL gearman >= 0.6.0)
GearmanClient::setTimeout — Establece el tiempo máximo de inactividad para actividad de entrada/salida en el socket
Descripción
public bool GearmanClient::setTimeout
( int
$timeout
)Establece el tiempo máximo de inactividad para actividad de entrada/salida en el socket
Parámetros
-
timeout -
Un intervalo de tiempo en milisegundos
Valores devueltos
Siempre retorna TRUE.
Ismael Cristal Jr ¶
7 months ago
