Module: Resque
- Defined in:
- lib/resque_ui/overrides/resque/job.rb,
lib/resque_ui/overrides/resque/resque.rb,
lib/resque_ui/overrides/resque/worker.rb,
lib/resque_ui/overrides/resque/failure/redis.rb,
lib/resque_ui/overrides/resque_status/status.rb,
lib/resque_ui/overrides/resque_status/job_with_status.rb,
lib/resque_ui/overrides/resque_status/chained_job_with_status.rb
Defined Under Namespace
Modules: Failure Classes: ChainedJobWithStatus, Job, JobWithStatus, Status, Worker
Class Method Summary collapse
Class Method Details
.throttle(queue, limit = 10000, sleep_for = 60) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/resque_ui/overrides/resque/resque.rb', line 2 def self.throttle(queue, limit = 10000, sleep_for = 60) loop do break if Resque.size(queue.to_s) < limit sleep sleep_for end end |