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

11 lines
233 B
Ruby
Raw Normal View History

# 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