On Tue, Oct 30, 2012 at 3:41 PM, Jurian Sluiman <[email protected]> wrote:
> how do you relate the errors from jobs to your log?

I'd suggest making sure the logs contain enough context for
debugging failures, including the job id and possibly also a
description of what the job was trying to do.

The idea is to avoid the need to match up log messages to
beanstalkd jobs by putting all necessary info in the logs.

> "just delete the job and put a new one back".

I don't usually use that pattern, but if you do, you can generate
your own request-id (for example, a version 4 UUID) and use
that consistently across several beanstalkd jobs.

> Releasing a job with a delay can't be done for
> above reasons (ie, where do you store the counter?).

Beanstalkd counts the number of times a job was released.
You can get the count from stats-job.

> 3. "For retries, [...], but do add a time delay with exponential backoff":
> same as above, where do you store this logic?

You can get the job's previous delay time with stats-job.

See 
https://github.com/kr/beanstalk-client-ruby/blob/master/lib/beanstalk-client/job.rb#L97
for an example combining an exponential backoff with a cutoff
to limit the total number of retries.

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