lib/backgrounder/support/backends.rb in carrierwave_backgrounder-0.4.2 vs lib/backgrounder/support/backends.rb in carrierwave_backgrounder-0.4.3

- old
+ new

@@ -20,10 +20,14 @@ self.send :"enqueue_#{backend}", worker, class_name, subject_id, mounted_as end private + def enqueue_active_job(worker, *args) + worker.perform_later(*args.map(&:to_s)) + end + def enqueue_delayed_job(worker, *args) worker_args = {} if ::Delayed::Job.new.respond_to?(:queue) worker_args[:queue] = queue_options[:queue] if queue_options[:queue] worker_args[:priority] = queue_options[:priority] if queue_options[:priority] @@ -42,10 +46,10 @@ ::Resque.enqueue worker, *args end def enqueue_sidekiq(worker, *args) override_queue_name = worker.sidekiq_options['queue'] == 'default' || worker.sidekiq_options['queue'].nil? - args = sidekiq_queue_options(override_queue_name, 'class' => worker, 'args' => args) + args = sidekiq_queue_options(override_queue_name, 'class' => worker, 'args' => args.map(&:to_s)) worker.client_push(args) end def enqueue_girl_friday(worker, *args) @girl_friday_queue ||= GirlFriday::WorkQueue.new(queue_options.delete(:queue) || :carrierwave, queue_options) do |msg|