Maximum number of releases for a job

3 views
Skip to first unread message

Ram

unread,
Jul 5, 2008, 1:01:29 AM7/5/08
to beanstalk-talk
Hi,

I am using the ruby beanstalk-client. I am implementing a poller using
the delay attribute in a job. I have something like this:

loop do
job = bstalk.reserve
body = j.ybody
if body[:t] == "poller"
# do something now
j.release(100,2)
end
end

The above job gets processed every 2 seconds. Is it better to release
it with a delay, or should I replace that with a job.delete and a
job.yput?
Is it more expensive to do a release?
Are there any limits on the number of releases a job can go through?

Thanks

Dustin

unread,
Jul 5, 2008, 2:34:41 AM7/5/08
to beanstalk-talk

On Jul 4, 10:01 pm, Ram <ram.ravichand...@gmail.com> wrote:

> The above job gets processed every 2 seconds. Is it better to release
> it with a delay, or should I replace that with a job.delete and a
> job.yput?

release will be *way* more efficient. You probably want decay in
your example, though.

> Is it more expensive to do a release?
> Are there any limits on the number of releases a job can go through?

Not practically.
Reply all
Reply to author
Forward
0 new messages