You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running several jobs in parallel similar to this, the worker should be able to define a job-level timeout, and when that time is exceeded, mark the job as failed. This is important for all blocking (foreground) jobs as the client is perpetually stalled until the slowest running job is completed.
Same as CAN_DO, but with a timeout value on how long the job
is allowed to run. After the timeout value, the job server will mark the job as failed and notify any listening clients.
Registers a function name with the job server with an optional timeout. The timeout specifies how many seconds the server will wait before marking a job as failed. If the timeout is set to zero, there is no timeout.
@bmeynell Right now we don't have that built into the bundle, however adding it shouldn't be too difficult. For the most part I think it'd be adding a new option to the work definition like jobTimeout, then adding it to when we add the function to the worker here: https://github.com/mmoreram/GearmanBundle/blob/master/Service/GearmanExecute.php#L321
Finally just would need to update the docs and to add a test for it.
I think for the most part that is all there is. I'm a bit busy with getting caught up after the holidays so don't have time to work on it right now. If you want to make a PR I can get it merged and released for you, otherwise I can try to work on it later this month.
When running several jobs in parallel similar to this, the worker should be able to define a job-level timeout, and when that time is exceeded, mark the job as failed. This is important for all blocking (foreground) jobs as the client is perpetually stalled until the slowest running job is completed.
Gearman Protocol:
GearmanWorker::register ( string $function_name [, int $timeout ] ):
GearmanWorker::addFunction ( string $function_name , callable $function [, mixed &$context [, int $timeout ]] ):
Is there a way to achieve this functionality with this bundle?
The text was updated successfully, but these errors were encountered: