I am using the gearman pecl extension in php and want to have a timeout to call a function. Two use cases: (1) there are no working workers, (2) the employee takes too much time to complete
If everything works, the call is very fast, and I want to avoid the overhead for this timeout.
Currently using code I:
$client = new GearmanClient();
$client->addServer();
$client->do('nonexistingfunction');
source
share