delayed job instead of multiple daemons

2 views
Skip to first unread message

Karl

unread,
Nov 11, 2009, 10:39:38 AM11/11/09
to delayed_job
Instead of having multiple daemon processes in production we use
delayed jobs that enqueue themselves when finished processing.

class MyJob

def perform
SomeClass.do_some_stuff
Delayed::Job.enqueue(self.class.new, 5,
10.seconds.from_now)
end

end

Ideally there should only every be one of each specific job running at
a time, but the problem is that somehow they often multiply.

Is this a correct way to use delayed_job? Has anyone else run into
this issue?

thx.

-karl
Reply all
Reply to author
Forward
0 new messages