debug: add checkpoint timestamps to processDate for hang diagnosis
Deploy Iddaai Backend / build-and-deploy (push) Successful in 46s

This commit is contained in:
2026-04-26 17:04:46 +03:00
parent a338d02244
commit bc461429f6
+5
View File
@@ -337,6 +337,7 @@ export class FeederService {
const apiReturnedCount = allMatches.length; const apiReturnedCount = allMatches.length;
const afterDateFilterCount = dateFilteredMatches.length; const afterDateFilterCount = dateFilteredMatches.length;
this.logger.warn(`[${sport}] [${dateString}] ⏱️ CHECKPOINT-1: dateFilter done. API=${apiReturnedCount}, filtered=${afterDateFilterCount}`);
if (apiReturnedCount > 0 && afterDateFilterCount === 0) { if (apiReturnedCount > 0 && afterDateFilterCount === 0) {
this.logger.log( this.logger.log(
@@ -387,13 +388,17 @@ export class FeederService {
// 2. Filter out already existing matches & patch incomplete ones // 2. Filter out already existing matches & patch incomplete ones
const allIds = matchesToProcess.map((m) => m.id); const allIds = matchesToProcess.map((m) => m.id);
this.logger.warn(`[${sport}] [${dateString}] ⏱️ CHECKPOINT-2: pre-getExistingMatchIds, ${allIds.length} IDs`);
const existingIds = const existingIds =
await this.persistenceService.getExistingMatchIds(allIds); await this.persistenceService.getExistingMatchIds(allIds);
this.logger.warn(`[${sport}] [${dateString}] ⏱️ CHECKPOINT-3: getExistingMatchIds done, ${existingIds.length} existing`);
const totalCount = matchesToProcess.length; const totalCount = matchesToProcess.length;
// ── Patch incomplete existing matches ────────────────────── // ── Patch incomplete existing matches ──────────────────────
// Find matches that ARE in DB but have missing data scopes // Find matches that ARE in DB but have missing data scopes
this.logger.warn(`[${sport}] [${dateString}] ⏱️ CHECKPOINT-4: pre-getMissingScopes`);
const allExistingInDb = await this.persistenceService.getMissingScopes(allIds); const allExistingInDb = await this.persistenceService.getMissingScopes(allIds);
this.logger.warn(`[${sport}] [${dateString}] ⏱️ CHECKPOINT-5: getMissingScopes done, ${allExistingInDb.size} incomplete`);
if (allExistingInDb.size > 0) { if (allExistingInDb.size > 0) {
this.logger.log( this.logger.log(
`[${sport}] [${dateString}] 🔧 Found ${allExistingInDb.size} existing matches with missing data. Patching...`, `[${sport}] [${dateString}] 🔧 Found ${allExistingInDb.size} existing matches with missing data. Patching...`,