Class: LiabilityInsuranceWorker
- Inherits:
-
Object
- Object
- LiabilityInsuranceWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/liability_insurance_worker.rb
Overview
Sidekiq worker: liability insurance.
Instance Method Summary collapse
-
#perform ⇒ Object
Runs the job.
Instance Method Details
#perform ⇒ Object
Runs the job.
10 11 12 13 14 15 |
# File 'app/workers/liability_insurance_worker.rb', line 10 def perform # Mark active cards that have passed their expiration date as expired. The # customer-facing reminders and certification suspension are handled by # Certification::InsuranceEscalation (via CertificationCheckWorker). LiabilityInsurance.active.where(expiration_date: ...Time.current).find_each(&:expire!) end |