From 78b7600e010c03b140910d0d725f16434d62c305 Mon Sep 17 00:00:00 2001 From: Antoine Bigard Date: Thu, 19 Dec 2024 15:50:45 +0100 Subject: [PATCH] feat: change anonymize from 1 to 2 years --- server/src/jobs/anonymization/anonymizeOldApplications.ts | 4 ++-- server/src/jobs/jobs.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/jobs/anonymization/anonymizeOldApplications.ts b/server/src/jobs/anonymization/anonymizeOldApplications.ts index d4770fce6a..39b4808d93 100644 --- a/server/src/jobs/anonymization/anonymizeOldApplications.ts +++ b/server/src/jobs/anonymization/anonymizeOldApplications.ts @@ -6,7 +6,7 @@ const anonymizeApplications = async () => { logger.info(`Début anonymisation`) const lastYear = new Date() - lastYear.setFullYear(lastYear.getFullYear() - 1) + lastYear.setFullYear(lastYear.getFullYear() - 2) const matchCondition = { created_at: { $lte: lastYear } } @@ -40,7 +40,7 @@ const anonymizeApplications = async () => { export const anonymizeOldApplications = async function () { try { - logger.info(" -- Anonymisation des candidatures de plus de un (1) an -- ") + logger.info(" -- Anonymisation des candidatures de plus de un (2) an -- ") const anonymizedApplicationCount = await anonymizeApplications() diff --git a/server/src/jobs/jobs.ts b/server/src/jobs/jobs.ts index 1d55fff30f..db8ddbd58e 100644 --- a/server/src/jobs/jobs.ts +++ b/server/src/jobs/jobs.ts @@ -150,7 +150,7 @@ export async function setupJobProcessor() { cron_string: "5 0 * * *", handler: () => updateBrevoBlockedEmails({}), }, - "Anonymise les candidatures de plus de un an": { + "Anonymise les candidatures de plus de deux an": { cron_string: "10 0 * * *", handler: anonymizeOldApplications, },