1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/lib/sidekiq/middleware/server
Filip Bartuzi 1885fcf5db Map retry_in period to integer
According to [wiki](https://github.com/mperham/sidekiq/wiki/Error-Handling). The return value of the block must be an integer.

However many users like to use 1.hour / 2.days / 34.seconds syntax from `Activesupport::Duration`.  All Activesupport::Duration instances can be mapped to integer with `to_i` method. Lets map it than!

```
 # The current retry count is yielded. The return value of the block must be 
  # an integer. It is used as the delay, in seconds. 
  sidekiq_retry_in do |count|
    10 * (count + 1) # (i.e. 10, 20, 30, 40)
  end
```
2015-09-09 14:13:57 +01:00
..
active_record.rb Don't load AR middleware at all unless AR::Base is defined, #1666 2014-04-24 21:37:20 -07:00
logging.rb small refactor for Logging middleware 2015-08-12 10:52:43 -07:00
retry_jobs.rb Map retry_in period to integer 2015-09-09 14:13:57 +01:00