From ec7c1b8076e69ad1db0c7e1d65616080ba800447 Mon Sep 17 00:00:00 2001 From: Lucas Charrier Date: Wed, 13 Nov 2024 16:15:33 +0100 Subject: [PATCH] chore: change first reminder time --- __tests__/test-newsletter.ts | 2 +- src/server/schedulers/newsletterScheduler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/test-newsletter.ts b/__tests__/test-newsletter.ts index a7a015f8..3de8d4d9 100644 --- a/__tests__/test-newsletter.ts +++ b/__tests__/test-newsletter.ts @@ -235,7 +235,7 @@ describe("Newsletter", () => { .values({ ...mockNewsletter }) .execute(); clock = sinon.useFakeTimers( - add(mockNewsletter.publish_at, { days: -6 }) + add(mockNewsletter.publish_at, { days: -5 }) ); await newsletterReminder("FIRST_REMINDER"); slack.firstCall.args[0].text.should.equal( diff --git a/src/server/schedulers/newsletterScheduler.ts b/src/server/schedulers/newsletterScheduler.ts index 3b8a18f1..a57a81c9 100644 --- a/src/server/schedulers/newsletterScheduler.ts +++ b/src/server/schedulers/newsletterScheduler.ts @@ -138,7 +138,7 @@ Vérifie une dernière fois le contenu du pad ${newsletter.url}. À 16 h, il ser }; const REMINDER_NB_DAYS = { - FIRST_REMINDER: -6, + FIRST_REMINDER: -5, SECOND_REMINDER: 0, THIRD_REMINDER: 0, };