diff options
Diffstat (limited to 'lib/active_job/queue_adapters')
-rw-r--r-- | lib/active_job/queue_adapters/sidekiq_adapter.rb | 14 | ||||
-rw-r--r-- | lib/active_job/queue_adapters/sucker_punch_adapter.rb | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/lib/active_job/queue_adapters/sidekiq_adapter.rb b/lib/active_job/queue_adapters/sidekiq_adapter.rb new file mode 100644 index 0000000000..70c4377a23 --- /dev/null +++ b/lib/active_job/queue_adapters/sidekiq_adapter.rb @@ -0,0 +1,14 @@ +require 'sidekiq' +require 'active_job/job_wrappers/sidekiq_wrapper' + +module ActiveJob + module QueueAdapters + class SidekiqAdapter + class << self + def queue(job, *args) + JobWrappers::SidekiqWrapper.perform_async(job, *args) + end + end + end + end +end diff --git a/lib/active_job/queue_adapters/sucker_punch_adapter.rb b/lib/active_job/queue_adapters/sucker_punch_adapter.rb new file mode 100644 index 0000000000..8191e5a1df --- /dev/null +++ b/lib/active_job/queue_adapters/sucker_punch_adapter.rb @@ -0,0 +1,14 @@ +require 'sucker_punch' +require 'active_job/job_wrappers/sucker_punch_wrapper' + +module ActiveJob + module QueueAdapters + class SuckerPunchAdapter + class << self + def queue(job, *args) + JobWrappers::SuckerPunchWrapper.new.async.perform(job, *args) + end + end + end + end +end |