Method: SimpleWorker::Base#queue

Defined in:
lib/simple_worker/base.rb,
lib/simple_worker/server/overrides.rb

#queue(options = {}) ⇒ Object

Call this to queue up your job to SimpleWorker cloud. options:

:priority => 0, 1 or 2. Default is 0.
:recursive => true/false. Default is false. If you queue up a worker that is the same class as the currently
              running worker, it will be rejected unless you set this explicitly so we know you meant to do it.


213
214
215
216
217
218
219
220
221
222
223
# File 'lib/simple_worker/base.rb', line 213

def queue(options={})
#            puts 'in queue'
  set_auto_attributes
  upload_if_needed(options)

  response = SimpleWorker.service.queue(self.class.name, sw_get_data, options)
#            puts 'queue response=' + response.inspect
#      @task_set_id = response["task_set_id"]
  @task_id = response["task_id"]
  response
end