2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-10-06 19:33:49 +02:00
|
|
|
class Cron::PurgeManagerAdministrateurSessionsJob < Cron::CronJob
|
2024-06-13 16:40:08 +02:00
|
|
|
self.schedule_expression = "every day at 02:45"
|
2021-10-06 19:33:49 +02:00
|
|
|
|
|
|
|
def perform
|
2022-02-02 18:49:39 +01:00
|
|
|
# TODO: add id column to administrateurs_procedures and use destroy_all
|
|
|
|
AdministrateursProcedure.where(manager: true).delete_all
|
2022-07-25 09:01:11 +02:00
|
|
|
AssignTo.where(manager: true).destroy_all
|
2021-10-06 19:33:49 +02:00
|
|
|
end
|
|
|
|
end
|