[Backgroundrb-devel] cronjob, backgroundrb and crashes

Raghu Srinivasan raghu.srinivasan at gmail.com
Fri Jul 11 12:47:13 EDT 2008


Cedric,
I do something very similar (cron->URL wget ->Rails controller -> BDRb jobs
kicked off) and BDRb does great. Just make sure that your job key is unique
each time. Generate a random string if you don't care or you can use a
timestamp or even some DB id/key if you want to keep track of it somewhere.
Raghu

On Fri, Jul 11, 2008 at 5:29 AM, hemant <gethemant at gmail.com> wrote:

> On Fri, Jul 11, 2008 at 4:40 PM, Cédric <akyrho at gmail.com> wrote:
> > Hello everyone,
> >
> > I get some trouble with backgroundrb, and I hope finding some help right
> > here :-)
> >
> > Here's the case :
> >
> > Step 1 : A cron job is calling a given URL, each minute
> >
> > Step 2 : A controller, called by the previous step, is loading a new
> worker
> > after some test  :
> >
> > MiddleMan.new_worker(
> >                   :worker => :urls_worker,
> >                   :job_key => "url_" + url.id.to_s,
> >                   :data => { :url => url.address, :from_public_form =>
> false
> > })
> >
> > Step 3 : The worker works... or not. Randomly, the call to the worker
> just
> > fail and the worker is not loaded, but backgroundrb is working anyway.
> >
> > When the call failed once, i've got to kill and restart (most of the
> time,
> > more than once) backgroudrb to make it works again.
> >
>
> It could be because, you can't reuse job_keys while starting new
> workers as reported in previous mail.
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080711/9e2b22cb/attachment.html>


More information about the Backgroundrb-devel mailing list