aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-22 17:11:31 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-22 17:11:31 -0300
commit9cc74261d44485a82fd3e74161adbcfed9b1c579 (patch)
tree6f947499be7ab2b216b63c76f9d68bf938a85dfa /activejob/test
parent7df8a0d463ab4f2bc6a5d427cb6faa188b6354ab (diff)
parent9b319a53fa880a2407c4836a25f3637d4891fad9 (diff)
downloadrails-9cc74261d44485a82fd3e74161adbcfed9b1c579.tar.gz
rails-9cc74261d44485a82fd3e74161adbcfed9b1c579.tar.bz2
rails-9cc74261d44485a82fd3e74161adbcfed9b1c579.zip
Merge pull request #16602 from thetron/active_job_que_enqueue_at_support
Added enqueue_at support for QueAdapter in ActiveJob
Diffstat (limited to 'activejob/test')
-rw-r--r--activejob/test/adapters/que.rb2
-rw-r--r--activejob/test/support/que/inline.rb9
2 files changed, 11 insertions, 0 deletions
diff --git a/activejob/test/adapters/que.rb b/activejob/test/adapters/que.rb
index 640061bf54..e6abc57457 100644
--- a/activejob/test/adapters/que.rb
+++ b/activejob/test/adapters/que.rb
@@ -1,2 +1,4 @@
+require 'support/que/inline'
+
ActiveJob::Base.queue_adapter = :que
Que.mode = :sync
diff --git a/activejob/test/support/que/inline.rb b/activejob/test/support/que/inline.rb
new file mode 100644
index 0000000000..2e210acb6b
--- /dev/null
+++ b/activejob/test/support/que/inline.rb
@@ -0,0 +1,9 @@
+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)
+ self.run(*args)
+ end
+end