From e084d5bd7aaa113f29b4ea8d0f2305daeae33826 Mon Sep 17 00:00:00 2001 From: Cristian Bica Date: Fri, 22 Aug 2014 17:44:48 +0300 Subject: Implemented enqueue_at for ActiveJob's Backburner adapter --- activejob/lib/active_job/queue_adapters/backburner_adapter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activejob/lib/active_job') 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 -- cgit v1.2.3