From 083bac11129fc64de841083fca70f07850cf1e6d Mon Sep 17 00:00:00 2001 From: vishnu vinay Date: Wed, 5 Mar 2025 18:24:16 +0530 Subject: [PATCH] Task #234670 task : Days fetch from env --- src/cohort/cron/cron.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cohort/cron/cron.service.ts b/src/cohort/cron/cron.service.ts index b55225e..d3f0f4c 100644 --- a/src/cohort/cron/cron.service.ts +++ b/src/cohort/cron/cron.service.ts @@ -24,7 +24,7 @@ export class CronService { async getOldActiveCohorts() { try { const dateThreshold = new Date(); - dateThreshold.setDate(dateThreshold.getDate() - 30); + dateThreshold.setDate(dateThreshold.getDate() - parseInt(process.env.COHORT_EXPIRY_DAYS)); console.log(dateThreshold) const cohorts = await this.cohortRepository.find({