-
-
Notifications
You must be signed in to change notification settings - Fork 358
Closed
Description
I have a requirement to take some action when a job reaches it's max attempts and is discarded from the queue. I was hoping it would be possible to add a callback to Oban.Worker to handle this. I imagine something like this...
defmodule MyWorker do
use Oban.Worker, max_attempts: 5
def discarded(job) do
Logger.info("job #{job.id} was discarded after #{job.attempts}")
end
endnote: my use case is more complex than simple logging but hopefully it illustrates the point.
If this is something you would be willing to support in Oban I can have a go at putting together a PR to add the functionality.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels