Class: PerfectQueue::Backend
- Inherits:
-
Object
- Object
- PerfectQueue::Backend
- Defined in:
- lib/perfectqueue/backend.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#acquire(timeout, now = Time.now.to_i) ⇒ Object
=> token, task.
-
#cancel(id, delete_timeout = 3600, now = Time.now.to_i) ⇒ Object
=> true (success) or false (not found, canceled or finished).
- #close ⇒ Object
-
#finish(token, delete_timeout = 3600, now = Time.now.to_i) ⇒ Object
=> true (success) or false (canceled).
-
#list(&block) ⇒ Object
=> list {|id,created_at,data,timeout| ... }.
-
#submit(id, data, time = Time.now.to_i, resource = nil) ⇒ Object
=> true (success) or nil (already exists).
-
#update(token, timeout) ⇒ Object
=> nil.
Instance Method Details
#acquire(timeout, now = Time.now.to_i) ⇒ Object
=> token, task
27 28 |
# File 'lib/perfectqueue/backend.rb', line 27 def acquire(timeout, now=Time.now.to_i) end |
#cancel(id, delete_timeout = 3600, now = Time.now.to_i) ⇒ Object
=> true (success) or false (not found, canceled or finished)
39 40 |
# File 'lib/perfectqueue/backend.rb', line 39 def cancel(id, delete_timeout=3600, now=Time.now.to_i) end |
#close ⇒ Object
46 47 |
# File 'lib/perfectqueue/backend.rb', line 46 def close end |
#finish(token, delete_timeout = 3600, now = Time.now.to_i) ⇒ Object
=> true (success) or false (canceled)
31 32 |
# File 'lib/perfectqueue/backend.rb', line 31 def finish(token, delete_timeout=3600, now=Time.now.to_i) end |
#list(&block) ⇒ Object
=> list {|id,created_at,data,timeout| ... }
23 24 |
# File 'lib/perfectqueue/backend.rb', line 23 def list(&block) end |
#submit(id, data, time = Time.now.to_i, resource = nil) ⇒ Object
=> true (success) or nil (already exists)
43 44 |
# File 'lib/perfectqueue/backend.rb', line 43 def submit(id, data, time=Time.now.to_i, resource=nil) end |
#update(token, timeout) ⇒ Object
=> nil
35 36 |
# File 'lib/perfectqueue/backend.rb', line 35 def update(token, timeout) end |