Reputation: 4583
I have the following method
def max_attempts
3
end
But I want to check if Internet is not there, or the third party connection I am establishing is not available. I want delayed job to retry it. I have switched off internet, but I cannot see Delayed::Job
getting populated.
Upvotes: 0
Views: 918
Reputation: 11137
You can check:
Delayed::Job.find(id).attempts
attempts
should show you haw many attempts it tried to do and if it reached the maximum it will stop trying.
Make sure you are not catching the error some where, otherwise the Delayed job will think its success and will be removed from the table.
Upvotes: 1