demarches-normaliennes/app/jobs/cron/fix_missing_antivirus_analysis_job.rb
2024-08-22 09:26:48 +02:00

11 lines
322 B
Ruby

# frozen_string_literal: true
class Cron::FixMissingAntivirusAnalysisJob < Cron::CronJob
self.schedule_expression = "every day at 01:45"
def perform
ActiveStorage::Blob.where(virus_scan_result: ActiveStorage::VirusScanner::PENDING).find_each do |blob|
VirusScannerJob.perform_later(blob)
end
end
end