Compare commits

...

2 commits

3 changed files with 19 additions and 55 deletions

View file

@ -17,7 +17,7 @@
"@nestjs/core": "^10.2.2", "@nestjs/core": "^10.2.2",
"@nestjs/platform-express": "^10.2.2", "@nestjs/platform-express": "^10.2.2",
"@nestjs/platform-socket.io": "^10.2.2", "@nestjs/platform-socket.io": "^10.2.2",
"@nestjs/schedule": "^3.0.3", "@nestjs/schedule": "^4.0.0",
"@nestjs/swagger": "^7.1.8", "@nestjs/swagger": "^7.1.8",
"@nestjs/typeorm": "^10.0.0", "@nestjs/typeorm": "^10.0.0",
"@nestjs/websockets": "^10.2.2", "@nestjs/websockets": "^10.2.2",
@ -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",
@ -2022,11 +2021,11 @@
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
}, },
"node_modules/@nestjs/schedule": { "node_modules/@nestjs/schedule": {
"version": "3.0.4", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-3.0.4.tgz", "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.0.0.tgz",
"integrity": "sha512-uFJpuZsXfpvgx2y7/KrIZW9e1L68TLiwRodZ6+Gc8xqQiHSUzAVn+9F4YMxWFlHITZvvkjWziUFgRNCitDcTZQ==", "integrity": "sha512-zz4h54m/F/1qyQKvMJCRphmuwGqJltDAkFxUXCVqJBXEs5kbPt93Pza3heCQOcMH22MZNhGlc9DmDMLXVHmgVQ==",
"dependencies": { "dependencies": {
"cron": "2.4.3", "cron": "3.1.3",
"uuid": "9.0.1" "uuid": "9.0.1"
}, },
"peerDependencies": { "peerDependencies": {
@ -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",
@ -5109,12 +5098,12 @@
"devOptional": true "devOptional": true
}, },
"node_modules/cron": { "node_modules/cron": {
"version": "2.4.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/cron/-/cron-2.4.3.tgz", "resolved": "https://registry.npmjs.org/cron/-/cron-3.1.3.tgz",
"integrity": "sha512-YBvExkQYF7w0PxyeFLRyr817YVDhGxaCi5/uRRMqa4aWD3IFKRd+uNbpW1VWMdqQy8PZ7CElc+accXJcauPKzQ==", "integrity": "sha512-KVxeKTKYj2eNzN4ElnT6nRSbjbfhyxR92O/Jdp6SH3pc05CDJws59jBrZWEMQlxevCiE6QUTrXy+Im3vC3oD3A==",
"dependencies": { "dependencies": {
"@types/luxon": "~3.3.0", "@types/luxon": "~3.3.0",
"luxon": "~3.3.0" "luxon": "~3.4.0"
} }
}, },
"node_modules/cron-parser": { "node_modules/cron-parser": {
@ -5128,14 +5117,6 @@
"node": ">=12.0.0" "node": ">=12.0.0"
} }
}, },
"node_modules/cron/node_modules/luxon": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz",
"integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg==",
"engines": {
"node": ">=12"
}
},
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -14125,11 +14106,11 @@
} }
}, },
"@nestjs/schedule": { "@nestjs/schedule": {
"version": "3.0.4", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-3.0.4.tgz", "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.0.0.tgz",
"integrity": "sha512-uFJpuZsXfpvgx2y7/KrIZW9e1L68TLiwRodZ6+Gc8xqQiHSUzAVn+9F4YMxWFlHITZvvkjWziUFgRNCitDcTZQ==", "integrity": "sha512-zz4h54m/F/1qyQKvMJCRphmuwGqJltDAkFxUXCVqJBXEs5kbPt93Pza3heCQOcMH22MZNhGlc9DmDMLXVHmgVQ==",
"requires": { "requires": {
"cron": "2.4.3", "cron": "3.1.3",
"uuid": "9.0.1" "uuid": "9.0.1"
}, },
"dependencies": { "dependencies": {
@ -14784,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",
@ -16506,19 +16478,12 @@
"devOptional": true "devOptional": true
}, },
"cron": { "cron": {
"version": "2.4.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/cron/-/cron-2.4.3.tgz", "resolved": "https://registry.npmjs.org/cron/-/cron-3.1.3.tgz",
"integrity": "sha512-YBvExkQYF7w0PxyeFLRyr817YVDhGxaCi5/uRRMqa4aWD3IFKRd+uNbpW1VWMdqQy8PZ7CElc+accXJcauPKzQ==", "integrity": "sha512-KVxeKTKYj2eNzN4ElnT6nRSbjbfhyxR92O/Jdp6SH3pc05CDJws59jBrZWEMQlxevCiE6QUTrXy+Im3vC3oD3A==",
"requires": { "requires": {
"@types/luxon": "~3.3.0", "@types/luxon": "~3.3.0",
"luxon": "~3.3.0" "luxon": "~3.4.0"
},
"dependencies": {
"luxon": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz",
"integrity": "sha512-An0UCfG/rSiqtAIiBPO0Y9/zAnHUZxAMiCpTd5h2smgsj7GGmcenvrvww2cqNA8/4A5ZrD1gJpHN2mIHZQF+Mg=="
}
} }
}, },
"cron-parser": { "cron-parser": {

View file

@ -47,7 +47,7 @@
"@nestjs/core": "^10.2.2", "@nestjs/core": "^10.2.2",
"@nestjs/platform-express": "^10.2.2", "@nestjs/platform-express": "^10.2.2",
"@nestjs/platform-socket.io": "^10.2.2", "@nestjs/platform-socket.io": "^10.2.2",
"@nestjs/schedule": "^3.0.3", "@nestjs/schedule": "^4.0.0",
"@nestjs/swagger": "^7.1.8", "@nestjs/swagger": "^7.1.8",
"@nestjs/typeorm": "^10.0.0", "@nestjs/typeorm": "^10.0.0",
"@nestjs/websockets": "^10.2.2", "@nestjs/websockets": "^10.2.2",
@ -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",

View file

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