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

10 lines
233 B
Ruby

# frozen_string_literal: true
class Cron::PurgeStaleBatchOperationJob < Cron::CronJob
self.schedule_expression = "every 5 minutes"
def perform
BatchOperation.stale.destroy_all
BatchOperation.stuck.destroy_all
end
end