Class: QPush::Server::Delay
- Inherits:
-
Object
- Object
- QPush::Server::Delay
- Defined in:
- lib/qpush/server/delay.rb
Overview
The Delay worker requeues any jobs that have been delayed on our Redis server. Delayed jobs are pulled by a ‘zrangebyscore’, with the score representing the time the job should be performed.
Instance Method Summary collapse
-
#initialize ⇒ Delay
constructor
A new instance of Delay.
-
#shutdown ⇒ Object
Shutsdown our delay process.
-
#start ⇒ Object
Starts our delay process.
Constructor Details
#initialize ⇒ Delay
Returns a new instance of Delay.
8 9 10 11 |
# File 'lib/qpush/server/delay.rb', line 8 def initialize @done = false @conn = nil end |
Instance Method Details
#shutdown ⇒ Object
Shutsdown our delay process.
27 28 29 |
# File 'lib/qpush/server/delay.rb', line 27 def shutdown @done = true end |