Method: Cyclop#next
- Defined in:
- lib/cyclop.rb
#next(*args) ⇒ Object
Get a ‘Cyclop::Job` to process
Parameters:
* (Symbol, String) queues - list of queues to get a `Cyclop::Job` from. Defaults to all.
* (Hash) opts (defaults to: {}) - a customizable set of .
Options Hash (opts):
* (String) :host - limit to `Cyclop::Job`s queued by this host.
Returns a ‘Cyclop::Job` or `nil` if nothing to process
102 103 104 105 |
# File 'lib/cyclop.rb', line 102 def next(*args) opts = extract_opts! args Cyclop::Job.next({queues: args, locked_by: master_id}.merge opts) end |