solid_queue icon indicating copy to clipboard operation
solid_queue copied to clipboard

Add test case to demonstrate that recurring tasks don't report exceptions to the error reporter

Open fractaledmind opened this issue 1 year ago • 1 comments

@rosa: I don't yet have a fix for this, but I'm hoping that a test case will help you to help me fix this.

fractaledmind avatar May 03 '24 10:05 fractaledmind

Also of note, if I run a ErroringJob.perform_later from the console, that exception is not reported either

fractaledmind avatar May 03 '24 10:05 fractaledmind

Sorry for totally ignoring this one! I don't know why I thought it was incomplete when you first opened it, so decided to wait until you finished it, and then completely forgot! I've come back to it now and I don't know why I thought it was incomplete 😳 It's not.

This behaviour was initially intended. I noticed some error handling libraries like sentry-rails or rollbar-gem that hook onto Active Job directly, so if I also reported this, we'd end up with duplicate error reports 🤔 But I'm not quite sure this is the right thing, perhaps it should be optional (via a new option, on_job_error like on_thread_error, or perhaps using on_thread_error for this)... Or maybe it should just be documented, which is what #139 intended to do, but that one was never completed 🤔

rosa avatar Sep 16 '24 14:09 rosa

Ok, I went with documenting this in the end, for now, but perhaps this should change in the future to a config option or something else 🤔

rosa avatar Sep 16 '24 18:09 rosa

Yeah, probably the right place to start. Annoying that major players don't use the Rails error subscriber now and force these kind of pragmatics on us. But it is what it is

fractaledmind avatar Sep 16 '24 18:09 fractaledmind