demarches-normaliennes/app/jobs/cron/purge_stale_batch_operation_job.rb

8 lines
202 B
Ruby

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