Abort on exception works for me.

On Monday, March 17, 2014, Chris Hanks <notifications@github.com> wrote:

> In lib/que/job.rb:
>
> > @@ -101,7 +101,7 @@ def work(queue = '')
> >              else
> >                {:event => :job_unavailable}
> >              end
> > -          rescue => error
> > +          rescue Exception => error
>
> I scrapped the Interrupt system a while ago because it was inherently
> unsafe. I don't believe it would affect signal handling as it stands now,
> since Job.work isn't called by the main thread (except in the forking
> worker, where INT and TERM are caught). I'm still wary of it, though, since
> it would also catch things like NoMemoryError.
>
> It seems to me that if you have something like memory problems or a syntax
> error in a file, it's better for the process to end than to try to
> continue, so rescue Exception feels like the wrong approach to me. Maybe
> setting abort_on_exception = true for the worker threads would make more
> sense, so that you would have seen this error a lot sooner. I'll have to
> experiment with it, though.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/chanks/que/pull/37/files#r10691208>
> .
>