diff --git a/server/package-lock.json b/server/package-lock.json index b5843b593b..96b2a30651 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -17,7 +17,7 @@ "@nestjs/core": "^10.2.2", "@nestjs/platform-express": "^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/typeorm": "^10.0.0", "@nestjs/websockets": "^10.2.2", @@ -2466,11 +2466,11 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@nestjs/schedule": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-3.0.4.tgz", - "integrity": "sha512-uFJpuZsXfpvgx2y7/KrIZW9e1L68TLiwRodZ6+Gc8xqQiHSUzAVn+9F4YMxWFlHITZvvkjWziUFgRNCitDcTZQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.0.0.tgz", + "integrity": "sha512-zz4h54m/F/1qyQKvMJCRphmuwGqJltDAkFxUXCVqJBXEs5kbPt93Pza3heCQOcMH22MZNhGlc9DmDMLXVHmgVQ==", "dependencies": { - "cron": "2.4.3", + "cron": "3.1.3", "uuid": "9.0.1" }, "peerDependencies": { @@ -5618,12 +5618,12 @@ "devOptional": true }, "node_modules/cron": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/cron/-/cron-2.4.3.tgz", - "integrity": "sha512-YBvExkQYF7w0PxyeFLRyr817YVDhGxaCi5/uRRMqa4aWD3IFKRd+uNbpW1VWMdqQy8PZ7CElc+accXJcauPKzQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/cron/-/cron-3.1.3.tgz", + "integrity": "sha512-KVxeKTKYj2eNzN4ElnT6nRSbjbfhyxR92O/Jdp6SH3pc05CDJws59jBrZWEMQlxevCiE6QUTrXy+Im3vC3oD3A==", "dependencies": { "@types/luxon": "~3.3.0", - "luxon": "~3.3.0" + "luxon": "~3.4.0" } }, "node_modules/cron-parser": { @@ -5637,14 +5637,6 @@ "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": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -14609,11 +14601,11 @@ } }, "@nestjs/schedule": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-3.0.4.tgz", - "integrity": "sha512-uFJpuZsXfpvgx2y7/KrIZW9e1L68TLiwRodZ6+Gc8xqQiHSUzAVn+9F4YMxWFlHITZvvkjWziUFgRNCitDcTZQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.0.0.tgz", + "integrity": "sha512-zz4h54m/F/1qyQKvMJCRphmuwGqJltDAkFxUXCVqJBXEs5kbPt93Pza3heCQOcMH22MZNhGlc9DmDMLXVHmgVQ==", "requires": { - "cron": "2.4.3", + "cron": "3.1.3", "uuid": "9.0.1" }, "dependencies": { @@ -17045,19 +17037,12 @@ "devOptional": true }, "cron": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/cron/-/cron-2.4.3.tgz", - "integrity": "sha512-YBvExkQYF7w0PxyeFLRyr817YVDhGxaCi5/uRRMqa4aWD3IFKRd+uNbpW1VWMdqQy8PZ7CElc+accXJcauPKzQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/cron/-/cron-3.1.3.tgz", + "integrity": "sha512-KVxeKTKYj2eNzN4ElnT6nRSbjbfhyxR92O/Jdp6SH3pc05CDJws59jBrZWEMQlxevCiE6QUTrXy+Im3vC3oD3A==", "requires": { "@types/luxon": "~3.3.0", - "luxon": "~3.3.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==" - } + "luxon": "~3.4.0" } }, "cron-parser": { diff --git a/server/package.json b/server/package.json index f2dd8f0adc..bd895c140b 100644 --- a/server/package.json +++ b/server/package.json @@ -44,7 +44,7 @@ "@nestjs/core": "^10.2.2", "@nestjs/platform-express": "^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/typeorm": "^10.0.0", "@nestjs/websockets": "^10.2.2", diff --git a/server/src/infra/repositories/job.repository.ts b/server/src/infra/repositories/job.repository.ts index 01c938e005..9152120cdd 100644 --- a/server/src/infra/repositories/job.repository.ts +++ b/server/src/infra/repositories/job.repository.ts @@ -34,7 +34,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