fix: change CronJob in addCronJob to match new type required by nestjs schedule module

This commit is contained in:
Zack Pollard 2023-12-02 00:08:10 +04:00
parent d9b9b505d6
commit 5734401091
3 changed files with 1 additions and 22 deletions

View file

@ -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",

View file

@ -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",

View file

@ -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<null, null>(
expression,
onTick,
// function to run onComplete