Class: SidekiqRobustJob::MissedJobs

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/sidekiq_robust_job/missed_jobs.rb

Instance Method Summary collapse

Constructor Details

#initialize(jobs_repository:, missed_job_policy:) ⇒ MissedJobs

Returns a new instance of MissedJobs.



13
14
15
16
# File 'lib/sidekiq_robust_job/missed_jobs.rb', line 13

def initialize(jobs_repository:, missed_job_policy:)
  @jobs_repository = jobs_repository
  @missed_job_policy = missed_job_policy
end

Instance Method Details

#allObject



18
19
20
# File 'lib/sidekiq_robust_job/missed_jobs.rb', line 18

def all
  @all ||= jobs_repository.missed_jobs(missed_job_policy: missed_job_policy)
end

#invokeObject



22
23
24
# File 'lib/sidekiq_robust_job/missed_jobs.rb', line 22

def invoke
  each(&:reschedule)
end