252b3e4719
attention, pour notre instance, avec ma db anonymiser : ``` ExpiredUsersDeletionService.find_expired_user.pluck(:id).size => 1795515 ```
8 lines
246 B
Ruby
8 lines
246 B
Ruby
class Cron::ExpiredUsersDeletionJob < Cron::CronJob
|
|
self.schedule_expression = "every day at 11 pm"
|
|
|
|
def perform(*args)
|
|
return if ENV['EXPIRE_USER_DELETION_JOB_DISABLED'].present?
|
|
ExpiredUsersDeletionService.process_expired
|
|
end
|
|
end
|