Class: ActiveInteraction::ActiveJob::Sidekiq::ConfiguredJob
- Inherits:
-
ActiveJob::ConfiguredJob
- Object
- ActiveJob::ConfiguredJob
- ActiveInteraction::ActiveJob::Sidekiq::ConfiguredJob
- Defined in:
- lib/active_interaction/active_job/sidekiq/configured_job.rb
Instance Method Summary collapse
- #perform_later(*args) ⇒ Object (also: #run!, #run)
- #perform_now(*args) ⇒ Object
Instance Method Details
#perform_later(*args) ⇒ Object Also known as: run!, run
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/active_interaction/active_job/sidekiq/configured_job.rb', line 6 def perform_later(*args) args = ActiveJob::Arguments.serialize(args) scope = @job_class.set(.except(:wait, :wait_until)) if @job_class.['encrypt'] args.prepend(nil) end if [:wait] scope.perform_in [:wait], *args elsif [:wait_until] scope.perform_at [:wait_until], *args else scope.perform_async *args end end |
#perform_now(*args) ⇒ Object
2 3 4 |
# File 'lib/active_interaction/active_job/sidekiq/configured_job.rb', line 2 def perform_now(*args) @job_class.run!(*args) end |