QueueClassic/queue_classic

Failuer handling should be configurable

Closed this issue · 3 comments

Since my application always has to be in a correct state, the queue should exit when an exception was raised.

At the moment there will be only one log entry (see https://github.com/ryandotsmith/queue_classic/blob/master/lib/queue_classic/worker.rb#L119), which is not sufficient for me.

I also use the exception_notifier gem + the rake extension (https://github.com/nikhaldi/exception_notification-rake), which should get triggered when a failing job occcures.

Due to the hard coded exception handling, I never get an email, since the exception is not raised until the exception_notification gem is aware of it.

What do you think?

Unless I misunderstand something, just overriding the handle_failure method in your project and do what you want should cover you, no?

We do that at Rainforest QA for some of our custom needs (retry mechanism, failed_jobs queue and more.

Let me know if I am misunderstanding this by any mean.

Yeah, for sure this will work.. But then you have to be really carefully when upgrading queue classic to the next version.. With an embedded configuration option, it looks more upgrade-stable?

But don't get me wrong, maybe I missinterpret how queues failure handling should work, it was just a thought and I wanted to get at least some feedback if I think something terrible wrong ^^

thanks!

Closing as there was no activity. That said, I would not be against a configurable way of handling failures. Feel free to open a PR when/if you want to do it.