Module: Resque
- Extended by:
- Resque
- Included in:
- Resque
- Defined in:
- lib/resque/resque.rb,
lib/resque/throttle.rb,
lib/resque/throttled_job.rb
Defined Under Namespace
Classes: SettingNotFound, ThrottledError, ThrottledJob
Instance Method Summary collapse
- #enqueue_with_throttle(klass, *args) ⇒ Object (also: #enqueue)
Instance Method Details
#enqueue_with_throttle(klass, *args) ⇒ Object Also known as: enqueue
8 9 10 11 12 13 |
# File 'lib/resque/resque.rb', line 8 def enqueue_with_throttle(klass, *args) if should_throttle?(klass, *args) raise ThrottledError.new("#{klass} with key #{klass.key(*args)} has exceeded it's throttle limit") end enqueue_without_throttle(klass, *args) end |