(PECL gearman >= 0.6.0)

GearmanClient::setTimeoutУстановка таймаута для операций ввода/вывода


public bool GearmanClient::setTimeout ( int $timeout )

Устанавливает таймаут для операций ввода/вывода.

Список параметров


Временной интервал в миллисекундах

Возвращаемые значения

Всегда возвращает TRUE.


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.
2012-10-06 05:54:09
If a timeout is set with this method, and a timeout occurred, calling ->returnCode() will return GEARMAN_TIMEOUT

Beware that a timeout of for example a doBackground() call does not mean the job did not start. It's very possible the job got submitted and started but the gearmand server was not able to communicate that information back to you.
2017-08-31 11:00:53

    Поддержать сайт на родительском проекте КГБ