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