Module: Trailblazer::Operation::Worker::ClassMethods
- Defined in:
- lib/trailblazer/1.1/operation/worker.rb
Instance Method Summary collapse
- #jid=(jid) ⇒ Object
- #new(*args) ⇒ Object
-
#perform(params) ⇒ Object
called by Sidekiq.
- #run(params) ⇒ Object
Instance Method Details
#jid=(jid) ⇒ Object
34 35 36 |
# File 'lib/trailblazer/1.1/operation/worker.rb', line 34 def jid=(jid) puts "@@@@@ #{jid.inspect}" end |
#new(*args) ⇒ Object
24 25 26 27 28 |
# File 'lib/trailblazer/1.1/operation/worker.rb', line 24 def new(*args) return super if args.any? # sidekiq behavior: (not a big fan of this) self end |
#perform(params) ⇒ Object
called by Sidekiq.
30 31 32 |
# File 'lib/trailblazer/1.1/operation/worker.rb', line 30 def perform(params) # called by Sidekiq. build_operation(params).perform end |
#run(params) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/trailblazer/1.1/operation/worker.rb', line 16 def run(params) if background? return perform_async(serializable(params)) end super(params) end |