This way I use Delayed :: Job (on Heroku) as an after_create callback after the user creates a specific model.
A common use case, however, turns out to be that users create something, then delete it right away (probably because they made a mistake or something like that).
When this happens, workers are activated, but by the time they request a model at hand, it has already been deleted, BUT due to the automatic repeat function, this ill-fated work will repeat 25 times, and certainly never Work.
Is it possible to somehow catch certain errors and, when they occur, to prevent the repetition of a particular task, but if it is not, will it happen again in the future?
source
share