catalinux catalinux - 1 year ago 137
PHP Question

Delay a gearman job in php

I have a Gearman Work in php that processes background tasks from client. From time to time I am not able to process that job. I would need a way to delay retry that job after 5 minutes. How can I do that?

What I do now is to do

) but this will retry the job immediately. Also I do not know how can I get the number of failures of that specific job (in the worker).


  1. How can I do the above stuff in Gearmand

  2. Is there any other
    messageing system that is capable of this?

Answer Source

You can't. At least not using built-in capabilities. This feature is only partly implemented in Gearmand and the PHP module does not expose this functionality. See this discussion on the feature.

People have tried different things, including:

When it comes to tracking failures - again, you can't, AFAIK. See my answer on handling retries in Gearman for a possible solution.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download