Hi Parand,

You can use 'releases' value got from job stats which shows number of
released performed on the given job.
My scenario is: for every job fail, release with incremented delay.

while True:
    job = inQueue.reserve()
    try:
        performUsefulStuff(job)
    except:
        releases = int(job.stats()['releases'])
        job.release(delay=60*releases)


On Sat, Nov 7, 2009 at 8:18 AM, Parand Darugar <[email protected]> wrote:
>
> I have a scenario where I need to implement retries for jobs in the
> queue - try the job three times, and on the 4th try put it into the
> failed queue. What's a good way to handle this? Is there a place to
> attach meta-data (eg. number of retries) on the job itself, or do I
> have to modify the payload of the job and resubmit it?
>
> This is using the beanstalkc python library.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to