1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Implemented enqueue_at for ActiveJob's Backburner adapter

This commit is contained in:
Cristian Bica 2014-08-22 17:44:48 +03:00
parent 9b61a7eda9
commit e084d5bd7a
2 changed files with 6 additions and 5 deletions

View file

@ -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

View file

@ -105,8 +105,8 @@ Active Job has adapters for the following queueing backends:
* [Delayed Job](https://github.com/collectiveidea/delayed_job)
* [Qu](https://github.com/bkeepers/qu)
* [Que](https://github.com/chanks/que)
* [QueueClassic](https://github.com/ryandotsmith/queue_classic)
* [Resque 1.x](https://github.com/resque/resque)
* [QueueClassic 2.x](https://github.com/ryandotsmith/queue_classic/tree/v2.2.3)
* [Resque 1.x](https://github.com/resque/resque/tree/1-x-stable)
* [Sidekiq](https://github.com/mperham/sidekiq)
* [Sneakers](https://github.com/jondot/sneakers)
* [Sucker Punch](https://github.com/brandonhilkert/sucker_punch)
@ -119,12 +119,12 @@ Active Job has adapters for the following queueing backends:
| **Delayed Job** | Yes | Yes | Yes | Job | Global | Global |
| **Que** | Yes | Yes | Yes | Job | No | Job |
| **Queue Classic** | Yes | Yes | Gem | No | No | No |
| **Resque** | Yes | Yes | Gem | Queue | Global | ? |
| **Resque** | Yes | Yes | Gem | Queue | Global | Yes |
| **Sidekiq** | Yes | Yes | Yes | Queue | No | Job |
| **Sneakers** | Yes | Yes | No | Queue | Queue | No |
| **Sucker Punch** | Yes | Yes | Yes | No | No | No |
| **Active Job** | Yes | Yes | WIP | No | No | No |
| **Active Job Inline** | No | Yes | N/A | N/A | N/A | N/A |
| **Active Job** | Yes | Yes | Yes | No | No | No |
### Change Backends