From 57344010910e3331b63fb07b6d58ca893f718d2c Mon Sep 17 00:00:00 2001 From: Zack Pollard Date: Sat, 2 Dec 2023 00:08:10 +0400 Subject: [PATCH] fix: change CronJob in addCronJob to match new type required by nestjs schedule module --- server/package-lock.json | 20 ------------------- server/package.json | 1 - .../src/infra/repositories/job.repository.ts | 2 +- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/server/package-lock.json b/server/package-lock.json index c64c97da9..9a1e77391 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -66,7 +66,6 @@ "@types/archiver": "^6.0.0", "@types/bcrypt": "^5.0.0", "@types/cookie-parser": "^1.4.3", - "@types/cron": "^2.0.1", "@types/express": "^4.17.17", "@types/fluent-ffmpeg": "^2.1.21", "@types/imagemin": "^8.0.1", @@ -2898,16 +2897,6 @@ "@types/node": "*" } }, - "node_modules/@types/cron": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/cron/-/cron-2.4.0.tgz", - "integrity": "sha512-5bBaAkqvSFBX8JMi/xCofNzG5E594TNsApMz68dLd/sQYz/HGQqgcxGHTRjOvD4G3Y+YF1Oo3S7QdCvKt1KAJQ==", - "deprecated": "This is a stub types definition. cron provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "cron": "*" - } - }, "node_modules/@types/docker-modem": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", @@ -14776,15 +14765,6 @@ "@types/node": "*" } }, - "@types/cron": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/cron/-/cron-2.4.0.tgz", - "integrity": "sha512-5bBaAkqvSFBX8JMi/xCofNzG5E594TNsApMz68dLd/sQYz/HGQqgcxGHTRjOvD4G3Y+YF1Oo3S7QdCvKt1KAJQ==", - "dev": true, - "requires": { - "cron": "*" - } - }, "@types/docker-modem": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", diff --git a/server/package.json b/server/package.json index ec551bd8d..89999ac79 100644 --- a/server/package.json +++ b/server/package.json @@ -92,7 +92,6 @@ "@types/archiver": "^6.0.0", "@types/bcrypt": "^5.0.0", "@types/cookie-parser": "^1.4.3", - "@types/cron": "^2.0.1", "@types/express": "^4.17.17", "@types/fluent-ffmpeg": "^2.1.21", "@types/imagemin": "^8.0.1", diff --git a/server/src/infra/repositories/job.repository.ts b/server/src/infra/repositories/job.repository.ts index 067ba9bbf..6bcf91bb4 100644 --- a/server/src/infra/repositories/job.repository.ts +++ b/server/src/infra/repositories/job.repository.ts @@ -24,7 +24,7 @@ export class JobRepository implements IJobRepository { } addCronJob(name: string, expression: string, onTick: () => void, start = true): void { - const job = new CronJob( + const job = new CronJob( expression, onTick, // function to run onComplete