Module: Que::ActiveJob::JobExtensions
- Includes:
- JobMethods
- Defined in:
- lib/que/active_job/extensions.rb
Overview
A module that devs can include into their ApplicationJob classes to get access to Que-like job behavior.
Instance Method Summary collapse
Methods included from JobMethods
Instance Method Details
#perform(*args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/que/active_job/extensions.rb', line 15 def perform(*args) args, kwargs = Que.split_out_ruby2_keywords(args) Que.internal_log(:active_job_perform, self) do {args: args, kwargs: kwargs} end _run( args: Que.recursively_freeze( que_filter_args( args.map { |a| a.is_a?(Hash) ? a.deep_symbolize_keys : a } ) ), kwargs: Que.recursively_freeze( que_filter_args( kwargs.deep_symbolize_keys, ) ), ) end |
#run(*args) ⇒ Object
10 11 12 |
# File 'lib/que/active_job/extensions.rb', line 10 def run(*args) raise Error, "Job class #{self.class} didn't define a run() method!" end |