[Backgroundrb-devel] Exceptions in workers
gethemant at gmail.com
Fri Dec 21 05:05:50 EST 2007
On Thu, 2007-12-20 at 23:49 -0800, Joe Van Dyk wrote:
> On Dec 20, 2007 11:43 PM, hemant kumar <gethemant at gmail.com> wrote:
> > On Thu, 2007-12-20 at 23:15 -0800, Joe Van Dyk wrote:
> > > If an exception is thrown in a worker, will the worker process exit?
> > > If it does and I don't want it to exit, do I need to rescue all
> > > exceptions in every worker method?
> > >
> > Every worker is just a Ruby program forked in a new process, so a
> > unhandled exception WILL cause the worker to exit.
> When the worker is scheduled to start a new job, a new process will
> run if the old one stopped, right?
Generally when you are scheduling a worker from backgroundrb.yml file,
same worker is reused to handle new jobs. It would be costly to start a
new worker for each job.
More information about the Backgroundrb-devel