tobymao / saq

Simple Async Queues
https://saq-py.readthedocs.io/en/latest/
MIT License
577 stars 39 forks source link

Running an action after a task fails and there are no more retries left #110

Closed xbexbex closed 9 months ago

xbexbex commented 9 months ago

Is there a built-in way to run code after the job fails and there are no more retries left? In my use case, I'm trying to update a related value in a database if the job is unsuccessful.

Or is there a way to get all the (failed) jobs? I guess querying Redis directly is one answer.

Loving the library, by the way!

tobymao commented 9 months ago

right now it seems like you can just query the database for all of the jobs.

you could probably reset a job's attempts before retrying or reprocessing it.