Class: Delayed::Web::Job::ActiveRecord
- Inherits:
-
Object
- Object
- Delayed::Web::Job::ActiveRecord
- Defined in:
- app/models/delayed/web/job/active_record.rb
Class Method Summary collapse
Class Method Details
.all ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/models/delayed/web/job/active_record.rb', line 8 def self.all jobs = Delayed::Job.order('id DESC').limit(100) Enumerator.new do |enumerator| jobs.each do |job| enumerator.yield decorate(job) end end end |
.decorate(job) ⇒ Object
17 18 19 20 21 |
# File 'app/models/delayed/web/job/active_record.rb', line 17 def self.decorate job job = StatusDecorator.new job job = ActiveRecordDecorator.new job job end |
.find(*args) ⇒ Object
4 5 6 |
# File 'app/models/delayed/web/job/active_record.rb', line 4 def self.find *args decorate Delayed::Job.find(*args) end |