2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-08-05 18:40:47 +02:00
|
|
|
class Cron::FixMissingAntivirusAnalysisJob < Cron::CronJob
|
2024-06-13 16:40:08 +02:00
|
|
|
self.schedule_expression = "every day at 01:45"
|
2020-12-17 10:54:12 +01:00
|
|
|
|
|
|
|
def perform
|
2022-12-22 18:20:58 +01:00
|
|
|
ActiveStorage::Blob.where(virus_scan_result: ActiveStorage::VirusScanner::PENDING).find_each do |blob|
|
2023-03-02 17:43:23 +01:00
|
|
|
VirusScannerJob.perform_later(blob)
|
2020-12-17 10:54:12 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|