With Gearman , can i check job failed how much times?
With Gearman , can i check job failed ho开发者_运维问答w much times ? example: if a job failed , i want it to repeat . if job failed 5 times then delete it. I must use which function.
example: if i want queue up to download file from a server. If that server is down, then job can't be finished .
In short, no. You can't query how many times a job has failed. However the information is there inside gearmand, but there is no API to access it yet.
I think the option you are looking for is
-j, --job-retries
This is an argument the gearmand server takes when starting. It specifies the number of times a job can be retried before being discarded. It is a global setting and cannot be configured to be different for different job types. It also cannot be set or changed from a gearman client.
精彩评论