Class: RoundRobin::Worker
- Inherits:
-
Object
- Object
- RoundRobin::Worker
- Defined in:
- lib/round_robin/worker.rb
Instance Attribute Summary collapse
-
#shutdown ⇒ Object
Returns the value of attribute shutdown.
Instance Method Summary collapse
Instance Attribute Details
#shutdown ⇒ Object
Returns the value of attribute shutdown.
3 4 5 |
# File 'lib/round_robin/worker.rb', line 3 def shutdown @shutdown end |
Instance Method Details
#pid ⇒ Object
12 13 14 |
# File 'lib/round_robin/worker.rb', line 12 def pid Process.pid end |
#work ⇒ Object
5 6 7 8 9 10 |
# File 'lib/round_robin/worker.rb', line 5 def work begin RoundRobin::Job.order("invoked_at").limit(1).first.try(:invoke_job) sleep sleep_time end while not shutdown end |