Class: Rocketman::JobQueue
- Inherits:
-
Object
- Object
- Rocketman::JobQueue
- Extended by:
- Forwardable
- Defined in:
- lib/rocketman/job_queue.rb
Constant Summary collapse
- QUEUE_KEY =
"rocketman".freeze
Instance Method Summary collapse
-
#initialize ⇒ JobQueue
constructor
A new instance of JobQueue.
- #schedule(job) ⇒ Object
Constructor Details
#initialize ⇒ JobQueue
Returns a new instance of JobQueue.
12 13 14 15 16 17 |
# File 'lib/rocketman/job_queue.rb', line 12 def initialize @storage = Rocketman.configuration.storage @jobs = get_job_queue at_exit { persist_events } if @storage.class.to_s == "Redis" end |
Instance Method Details
#schedule(job) ⇒ Object
19 20 21 |
# File 'lib/rocketman/job_queue.rb', line 19 def schedule(job) @jobs << job end |