librelist archives

« back to archive

Worker stops if process raises "error" (non-forking)

Worker stops if process raises "error" (non-forking)

From:
Thibaut Barrère
Date:
2010-04-01 @ 09:49
Hello,

I just noticed that if one of my worker (non-forking platform) raises an
exception, it will just exit.

Shouldn't it be picking the next job instead ?

-- Thibaut

Re: [resque] Worker stops if process raises "error" (non-forking)

From:
Chris Wanstrath
Date:
2010-04-01 @ 18:48
On Thu, Apr 1, 2010 at 2:49 AM, Thibaut Barrère
<thibaut.barrere@gmail.com> wrote:

> I just noticed that if one of my worker (non-forking platform) raises an
> exception, it will just exit.
>
> Shouldn't it be picking the next job instead ?

Is this happening inside a job, or somewhere else?

If it's during the processing of a job it should definitely be caught
by our `rescue Object` clause:

http://github.com/defunkt/resque/blob/master/lib/resque/worker.rb#L145-159

-- 
Chris Wanstrath
http://github.com/defunkt

Re: [resque] Worker stops if process raises "error" (non-forking)

From:
Thibaut Barrère
Date:
2010-04-01 @ 20:12
Hi Chris,

> Is this happening inside a job, or somewhere else?

It's inside the job - I went deeper in the code and saw the rescue Object
yes.

I'm not sure yet because I didn't have enough time to reproduce this, but it
may happen only when I use the secure mode on the HopToad failure back-end
(I'm behind a proxy, too).

My guess is that it could be caused by some error thrown outside the rescue
Object, in the failure notification code.

I'll try to understand what's happening and will report back if I do.

-- Thibaut