aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_job/queue_adapters/delayed_job_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_job/queue_adapters/delayed_job_adapter.rb')
-rw-r--r--lib/active_job/queue_adapters/delayed_job_adapter.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/active_job/queue_adapters/delayed_job_adapter.rb b/lib/active_job/queue_adapters/delayed_job_adapter.rb
index 14072e2801..214733e3a6 100644
--- a/lib/active_job/queue_adapters/delayed_job_adapter.rb
+++ b/lib/active_job/queue_adapters/delayed_job_adapter.rb
@@ -7,8 +7,12 @@ module ActiveJob
def queue(job, *args)
JobWrapper.new.delay(queue: job.queue_name).perform(job, *args)
end
+
+ def queue_at(job, timestamp, *args)
+ JobWrapper.new.delay(queue: job.queue_name, run_at: timestamp).perform(job, *args)
+ end
end
-
+
class JobWrapper
def perform(job, *args)
job.new.perform *Parameters.deserialize(args)