class ImportantNoticeGeneratorJob
Constants
- BATCH_SIZE
- STATUS_NOTICE_RECORDED_AT_FIELDS
Public Instance Methods
Source
# File app/jobs/important_notice_generator_job.rb, line 14 def perform(patient_ids = nil) scope = Patient.includes(:teams, vaccination_records: %i[team]) if patient_ids.present? process_batch(scope.where(id: patient_ids)) else scope.find_in_batches(batch_size: BATCH_SIZE) do |batch| process_batch(batch) end end end