Class: Qless::QueueJobs
- Inherits:
-
Object
- Object
- Qless::QueueJobs
- Defined in:
- lib/qless/queue.rb
Overview
A class for interacting with jobs in different states in a queue. Not meant to be instantiated directly, it’s accessed with Queue#jobs
Instance Method Summary collapse
- #depends(start = 0, count = 25) ⇒ Object
-
#initialize(name, client) ⇒ QueueJobs
constructor
A new instance of QueueJobs.
- #recurring(start = 0, count = 25) ⇒ Object
- #running(start = 0, count = 25) ⇒ Object
- #scheduled(start = 0, count = 25) ⇒ Object
- #stalled(start = 0, count = 25) ⇒ Object
Constructor Details
#initialize(name, client) ⇒ QueueJobs
Returns a new instance of QueueJobs.
11 12 13 14 |
# File 'lib/qless/queue.rb', line 11 def initialize(name, client) @name = name @client = client end |
Instance Method Details
#depends(start = 0, count = 25) ⇒ Object
28 29 30 |
# File 'lib/qless/queue.rb', line 28 def depends(start = 0, count = 25) @client.call('jobs', 'depends', @name, start, count) end |
#recurring(start = 0, count = 25) ⇒ Object
32 33 34 |
# File 'lib/qless/queue.rb', line 32 def recurring(start = 0, count = 25) @client.call('jobs', 'recurring', @name, start, count) end |
#running(start = 0, count = 25) ⇒ Object
16 17 18 |
# File 'lib/qless/queue.rb', line 16 def running(start = 0, count = 25) @client.call('jobs', 'running', @name, start, count) end |
#scheduled(start = 0, count = 25) ⇒ Object
24 25 26 |
# File 'lib/qless/queue.rb', line 24 def scheduled(start = 0, count = 25) @client.call('jobs', 'scheduled', @name, start, count) end |
#stalled(start = 0, count = 25) ⇒ Object
20 21 22 |
# File 'lib/qless/queue.rb', line 20 def stalled(start = 0, count = 25) @client.call('jobs', 'stalled', @name, start, count) end |