Skip to content

Commit

Permalink
feat: change anonymize from 1 to 2 years
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebigard committed Dec 19, 2024
1 parent c74c7dc commit 78b7600
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/src/jobs/anonymization/anonymizeOldApplications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }

Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion server/src/jobs/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down

0 comments on commit 78b7600

Please sign in to comment.