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
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
..
server Map retry_in period to integer 2015-09-09 14:13:57 +01:00
chain.rb Change &block in arguments to yield call 2015-02-12 22:57:03 +03:00
i18n.rb better rdoc for i18n 2014-08-16 10:32:03 -07:00