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
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.