Method: Roundhouse::Worker::ClassMethods#drain

Defined in:
lib/roundhouse/testing.rb

#drainObject

Drain and run all jobs for this worker



151
152
153
154
155
156
157
158
# File 'lib/roundhouse/testing.rb', line 151

def drain
  while job = jobs.shift do
    worker = new
    worker.jid = job['jid']
    worker.bid = job['bid'] if worker.respond_to?(:bid=)
    execute_job(worker, job['args'])
  end
end