aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorCristian Bica <cristian.bica@gmail.com>2014-08-22 17:44:48 +0300
committerCristian Bica <cristian.bica@gmail.com>2014-08-22 17:44:48 +0300
commite084d5bd7aaa113f29b4ea8d0f2305daeae33826 (patch)
treee68fc9aeff090218a44abc22cc37e9a0b305a73e /activejob
parent9b61a7eda929fcc2e2b0cd34e27d0fceafa7c389 (diff)
downloadrails-e084d5bd7aaa113f29b4ea8d0f2305daeae33826.tar.gz
rails-e084d5bd7aaa113f29b4ea8d0f2305daeae33826.tar.bz2
rails-e084d5bd7aaa113f29b4ea8d0f2305daeae33826.zip
Implemented enqueue_at for ActiveJob's Backburner adapter
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/queue_adapters/backburner_adapter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activejob/lib/active_job/queue_adapters/backburner_adapter.rb b/activejob/lib/active_job/queue_adapters/backburner_adapter.rb
index 6fe2d4eb53..8d34155645 100644
--- a/activejob/lib/active_job/queue_adapters/backburner_adapter.rb
+++ b/activejob/lib/active_job/queue_adapters/backburner_adapter.rb
@@ -9,7 +9,8 @@ module ActiveJob
end
def enqueue_at(job, timestamp, *args)
- raise NotImplementedError
+ delay = Time.current.to_f - timestamp
+ Backburner::Worker.enqueue JobWrapper, [ job.name, *args ], queue: job.queue_name, delay: delay
end
end