Module: RoundRobin
- Defined in:
- lib/round_robin.rb,
lib/round_robin/job.rb,
lib/round_robin/worker.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.add(klass, *args) ⇒ Object
5 6 7 8 |
# File 'lib/round_robin.rb', line 5 def self.add(klass, *args) json = {:class => klass.to_s, :args => args}.to_json RoundRobin::Job.create(:handler => json) end |
.clear ⇒ Object
10 11 12 |
# File 'lib/round_robin.rb', line 10 def self.clear RoundRobin::Job.destroy_all end |