aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorChris Hanks <christopher.m.hanks@gmail.com>2015-03-24 09:25:43 -0400
committerChris Hanks <christopher.m.hanks@gmail.com>2015-03-24 09:25:49 -0400
commitfdfca02c304d809aac53ebf8094b237d0ba6415e (patch)
treec837334357a1606565a12c7ab38d5c59e11a4f8c /activejob
parentb663e26544d46c111c5a7f44e269c624653c42e5 (diff)
downloadrails-fdfca02c304d809aac53ebf8094b237d0ba6415e.tar.gz
rails-fdfca02c304d809aac53ebf8094b237d0ba6415e.tar.bz2
rails-fdfca02c304d809aac53ebf8094b237d0ba6415e.zip
Stop using Que's named queues in its ActiveJob adapter.
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/queue_adapters/que_adapter.rb4
-rw-r--r--activejob/test/support/que/inline.rb6
2 files changed, 7 insertions, 3 deletions
diff --git a/activejob/lib/active_job/queue_adapters/que_adapter.rb b/activejob/lib/active_job/queue_adapters/que_adapter.rb
index 84cc2845b0..a1a41ccc32 100644
--- a/activejob/lib/active_job/queue_adapters/que_adapter.rb
+++ b/activejob/lib/active_job/queue_adapters/que_adapter.rb
@@ -16,11 +16,11 @@ module ActiveJob
# Rails.application.config.active_job.queue_adapter = :que
class QueAdapter
def enqueue(job) #:nodoc:
- JobWrapper.enqueue job.serialize, queue: job.queue_name
+ JobWrapper.enqueue job.serialize
end
def enqueue_at(job, timestamp) #:nodoc:
- JobWrapper.enqueue job.serialize, queue: job.queue_name, run_at: Time.at(timestamp)
+ JobWrapper.enqueue job.serialize, run_at: Time.at(timestamp)
end
class JobWrapper < Que::Job #:nodoc:
diff --git a/activejob/test/support/que/inline.rb b/activejob/test/support/que/inline.rb
index 2e210acb6b..0232da1370 100644
--- a/activejob/test/support/que/inline.rb
+++ b/activejob/test/support/que/inline.rb
@@ -3,7 +3,11 @@ require 'que'
Que::Job.class_eval do
class << self; alias_method :original_enqueue, :enqueue; end
def self.enqueue(*args)
- args.pop if args.last.is_a?(Hash)
+ if args.last.is_a?(Hash)
+ options = args.pop
+ options.delete(:run_at)
+ args << options unless options.empty?
+ end
self.run(*args)
end
end