saurabhnanda / odd-jobs

Haskell job queue with admin UI and loads of other features.
https://www.haskelltutorials.com/odd-jobs/
BSD 3-Clause "New" or "Revised" License
75 stars 29 forks source link

Some job callbacks are not used #63

Closed tfausak closed 1 year ago

tfausak commented 3 years ago

The config has a few callbacks for job lifecycle events:

Of those, cfgOnJobSuccess and cfgOnJobFailed appear to be called correctly. As far as I can tell the other two, cfgOnJobStart and cfgOnJobTimeout, are never used.

cfgOnJobStart is wired into the onJobStart method of the HasJobRunner class for RunnerM, but onJobStart itself is never called.

cfgOnJobTimeout appears to be completely unused.

saurabhnanda commented 3 years ago

@tfausak I've got #68 now to fix this issue. But I've not decided whether both, onJobFailed and onJobTimeout, are required or only onJobFailed is good-enough (with TimeoutException being treated as just another reason for failure). Any thoughts?

tfausak commented 3 years ago

I'd be fine with combining both the "failed" and "timeout" callbacks into one.