Class: Backgrounded::Handler::JobFuHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/handler/job_fu_handler.rb

Overview

invoke the operation in the background using job fu see github.com/jnstq/job_fu/tree

Instance Method Summary collapse

Instance Method Details

#request(object, method, *args) ⇒ Object

Parameters

Optional argment hash will be picked up by the request method

  • :priority - priority for the job

  • :at - when the job should run



14
15
16
17
18
# File 'lib/handler/job_fu_handler.rb', line 14

def request(object, method, *args)
  opt = args.extract_options!
  priority, process_at = opt[:priority], opt[:at]
  JobFu::Job.enqueue JobFu::ProcessableMethod.new(object, method, *args), priority, process_at
end