aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_job/queue_adapters/resque_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_job/queue_adapters/resque_adapter.rb')
-rw-r--r--lib/active_job/queue_adapters/resque_adapter.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/active_job/queue_adapters/resque_adapter.rb b/lib/active_job/queue_adapters/resque_adapter.rb
index 6686f10593..353b3ae690 100644
--- a/lib/active_job/queue_adapters/resque_adapter.rb
+++ b/lib/active_job/queue_adapters/resque_adapter.rb
@@ -1,6 +1,7 @@
require 'resque'
require 'active_support/core_ext/enumerable'
require 'active_support/core_ext/array/access'
+require 'resque_scheduler'
module ActiveJob
module QueueAdapters
@@ -9,6 +10,10 @@ module ActiveJob
def queue(job, *args)
Resque.enqueue JobWrapper.new(job), job, *args
end
+
+ def queue_at(job, timestamp, *args)
+ Resque.enqueue_at timestamp, JobWrapper.new(job), job, *args
+ end
end
class JobWrapper