Reputation: 1767
If an exception occurred in processing of a background job then how can i make it in queue again so it automatically get processed.
As in my scenario the background process having external (HTTP) calls so there are chances of network latency, so i would like to make it re-queue in case of network failure.
Upvotes: 2
Views: 940
Reputation: 1649
A gem called resque-retry
can handle this.
"provides retry, delay and exponential backoff support for resque jobs"
https://github.com/lantins/resque-retry
If you need a ruby 1.9 compatible version have a look through the forks, someone has been working on making it function correctly.
Upvotes: 3