Module: SidekiqIteration::Throttling
- Defined in:
- lib/sidekiq_iteration/throttling.rb
Defined Under Namespace
Classes: ThrottleCondition
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#throttle_on(backoff: 30) {|job| ... } ⇒ Object
Add a condition under which this job will be throttled.
Instance Attribute Details
#throttle_conditions ⇒ Object
29 30 31 |
# File 'lib/sidekiq_iteration/throttling.rb', line 29 def throttle_conditions @throttle_conditions ||= [] end |
Instance Method Details
#throttle_on(backoff: 30) {|job| ... } ⇒ Object
Add a condition under which this job will be throttled.
41 42 43 |
# File 'lib/sidekiq_iteration/throttling.rb', line 41 def throttle_on(backoff: 30, &condition) throttle_conditions << ThrottleCondition.new(condition, backoff) end |