2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-11-03 09:22:03 +01:00
|
|
|
class Cron::ExpiredUsersDeletionJob < Cron::CronJob
|
2023-11-07 07:26:29 +01:00
|
|
|
self.schedule_expression = Expired.schedule_at(self)
|
2023-11-09 18:43:01 +01:00
|
|
|
discard_on StandardError
|
2023-11-03 09:22:03 +01:00
|
|
|
|
|
|
|
def perform(*args)
|
2023-11-04 08:45:40 +01:00
|
|
|
return if ENV['EXPIRE_USER_DELETION_JOB_LIMIT'].blank?
|
2023-11-21 10:18:58 +01:00
|
|
|
Expired::UsersDeletionService.new.process_expired
|
2023-11-03 09:22:03 +01:00
|
|
|
end
|
|
|
|
end
|