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

10 lines
279 B
Ruby
Raw Normal View History

class Cron::ExpiredUsersDeletionJob < Cron::CronJob
self.schedule_expression = Expired.schedule_at(self)
discard_on StandardError
def perform(*args)
return if ENV['EXPIRE_USER_DELETION_JOB_LIMIT'].blank?
Expired::UsersDeletionService.new.process_expired
end
end