fix: change CronJob in addCronJob to match new type required by nestjs schedule module
This commit is contained in:
parent
d9b9b505d6
commit
5734401091
3 changed files with 1 additions and 22 deletions
20
server/package-lock.json
generated
20
server/package-lock.json
generated
|
@ -66,7 +66,6 @@
|
||||||
"@types/archiver": "^6.0.0",
|
"@types/archiver": "^6.0.0",
|
||||||
"@types/bcrypt": "^5.0.0",
|
"@types/bcrypt": "^5.0.0",
|
||||||
"@types/cookie-parser": "^1.4.3",
|
"@types/cookie-parser": "^1.4.3",
|
||||||
"@types/cron": "^2.0.1",
|
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/fluent-ffmpeg": "^2.1.21",
|
"@types/fluent-ffmpeg": "^2.1.21",
|
||||||
"@types/imagemin": "^8.0.1",
|
"@types/imagemin": "^8.0.1",
|
||||||
|
@ -2898,16 +2897,6 @@
|
||||||
"@types/node": "*"
|
"@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": {
|
"node_modules/@types/docker-modem": {
|
||||||
"version": "3.0.6",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz",
|
||||||
|
@ -14776,15 +14765,6 @@
|
||||||
"@types/node": "*"
|
"@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": {
|
"@types/docker-modem": {
|
||||||
"version": "3.0.6",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz",
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
"@types/archiver": "^6.0.0",
|
"@types/archiver": "^6.0.0",
|
||||||
"@types/bcrypt": "^5.0.0",
|
"@types/bcrypt": "^5.0.0",
|
||||||
"@types/cookie-parser": "^1.4.3",
|
"@types/cookie-parser": "^1.4.3",
|
||||||
"@types/cron": "^2.0.1",
|
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/fluent-ffmpeg": "^2.1.21",
|
"@types/fluent-ffmpeg": "^2.1.21",
|
||||||
"@types/imagemin": "^8.0.1",
|
"@types/imagemin": "^8.0.1",
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class JobRepository implements IJobRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
addCronJob(name: string, expression: string, onTick: () => void, start = true): void {
|
addCronJob(name: string, expression: string, onTick: () => void, start = true): void {
|
||||||
const job = new CronJob(
|
const job = new CronJob<null, null>(
|
||||||
expression,
|
expression,
|
||||||
onTick,
|
onTick,
|
||||||
// function to run onComplete
|
// function to run onComplete
|
||||||
|
|
Loading…
Reference in a new issue