From 087bf3a3ada7ded304ff11c6b1716d8369ee3c98 Mon Sep 17 00:00:00 2001 From: Ly Tuan Kiet Date: Mon, 9 Dec 2024 17:20:30 +0700 Subject: [PATCH] chore: update subproject commit reference and modify date handling in Cron service - Updated the subproject commit reference in epess-database to the latest version. - Changed the date handling in CronService to allow scheduling up to one day in advance instead of thirty minutes. - Removed commented-out code in DocumentSchema for improved clarity and maintainability. --- epess-database | 2 +- src/Cron/cron.service.ts | 2 +- src/Document/document.schema.ts | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/epess-database b/epess-database index fab4b28..b691e63 160000 --- a/epess-database +++ b/epess-database @@ -1 +1 @@ -Subproject commit fab4b28b98592f2d63be1b9018f5ab39ad73536c +Subproject commit b691e63e38dc743ce9976098f6164934095d9238 diff --git a/src/Cron/cron.service.ts b/src/Cron/cron.service.ts index 2f058e6..96a8adc 100644 --- a/src/Cron/cron.service.ts +++ b/src/Cron/cron.service.ts @@ -153,7 +153,7 @@ export class CronService { AND: [ { scheduleStart: { - lt: DateTimeUtils.now().plus({ minutes: 30 }).toJSDate(), + lt: DateTimeUtils.now().plus({ days: 1 }).toJSDate(), }, }, { diff --git a/src/Document/document.schema.ts b/src/Document/document.schema.ts index 6c354ba..7240967 100644 --- a/src/Document/document.schema.ts +++ b/src/Document/document.schema.ts @@ -144,8 +144,6 @@ export class DocumentSchema extends PothosSchema { if (!userId) { throw new Error('User not found') } - // const fileUrl = await this.minio.getFileUrl('document', 'document', 'document') - // if (!fileUrl) throw new Error('File not found') const document = await this.prisma.document.create({ ...query, data: {