diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-22 14:23:30 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-08-22 14:23:30 -0300 |
commit | ab00b2453519f7b1896c0e11a63e5630121dc7d1 (patch) | |
tree | 57f19af26ef718d737cd6ea863bfb30d0f070059 /activejob | |
parent | 4a5ea81b5ac09d382a94e3fb563a010d2c7f840d (diff) | |
parent | e084d5bd7aaa113f29b4ea8d0f2305daeae33826 (diff) | |
download | rails-ab00b2453519f7b1896c0e11a63e5630121dc7d1.tar.gz rails-ab00b2453519f7b1896c0e11a63e5630121dc7d1.tar.bz2 rails-ab00b2453519f7b1896c0e11a63e5630121dc7d1.zip |
Merge pull request #16641 from cristianbica/aj-backburner-enqueue-later
Implemented enqueue_at for ActiveJob's Backburner adapter
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/lib/active_job/queue_adapters/backburner_adapter.rb | 3 |
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 |