This commit is contained in:
2026-04-16 17:21:48 +03:00
parent c8fa4c442d
commit c8e7e4e927
116 changed files with 3720 additions and 4197 deletions
+8 -8
View File
@@ -1,6 +1,6 @@
import { Injectable, Logger } from '@nestjs/common';
import { Cron } from '@nestjs/schedule';
import { FeederService } from '../modules/feeder/feeder.service';
import { Injectable, Logger } from "@nestjs/common";
import { Cron } from "@nestjs/schedule";
import { FeederService } from "../modules/feeder/feeder.service";
@Injectable()
export class HistoricalResultsSyncTask {
@@ -9,7 +9,7 @@ export class HistoricalResultsSyncTask {
constructor(private readonly feederService: FeederService) {}
private shouldSkipInHistoricalMode(jobName: string): boolean {
if (process.env.FEEDER_MODE === 'historical') {
if (process.env.FEEDER_MODE === "historical") {
this.logger.debug(`Skipping ${jobName} in historical feeder mode`);
return true;
}
@@ -19,19 +19,19 @@ export class HistoricalResultsSyncTask {
/**
* Pull yesterday's completed matches into the permanent matches table.
*/
@Cron('0 8 * * *', { timeZone: 'Europe/Istanbul' })
@Cron("0 8 * * *", { timeZone: "Europe/Istanbul" })
async syncPreviousDayCompletedMatches() {
if (this.shouldSkipInHistoricalMode('syncPreviousDayCompletedMatches')) {
if (this.shouldSkipInHistoricalMode("syncPreviousDayCompletedMatches")) {
return;
}
this.logger.log(
'Starting previous-day completed match sync for football and basketball...',
"Starting previous-day completed match sync for football and basketball...",
);
try {
await this.feederService.runPreviousDayCompletedMatchesScan();
this.logger.log('Previous-day completed match sync finished');
this.logger.log("Previous-day completed match sync finished");
} catch (error: any) {
this.logger.error(
`Previous-day completed match sync failed: ${error.message}`,