From e6d8792a32cd337eee052f04c75d3cf08ef4ebac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Wed, 9 Apr 2025 10:18:03 +0200 Subject: [PATCH] feat(crawl-status): log if gcs job is not found --- apps/api/src/controllers/v1/crawl-status.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/api/src/controllers/v1/crawl-status.ts b/apps/api/src/controllers/v1/crawl-status.ts index 680db785..bcefa9c3 100644 --- a/apps/api/src/controllers/v1/crawl-status.ts +++ b/apps/api/src/controllers/v1/crawl-status.ts @@ -49,6 +49,11 @@ export async function getJob(id: string): Promise | null> { if (!bullJob && !dbJob) return null; const data = gcsJob ?? dbJob?.docs ?? bullJob?.returnvalue; + if (gcsJob === null && data) { + logger.warn("GCS Job not found", { + jobId: id, + }); + } const job: PseudoJob = { id, @@ -99,6 +104,11 @@ export async function getJobs(ids: string[]): Promise[]> { if (!bullJob && !dbJob) continue; const data = gcsJob ?? dbJob?.docs ?? bullJob?.returnvalue; + if (gcsJob === null && data) { + logger.warn("GCS Job not found", { + jobId: id, + }); + } const job: PseudoJob = { id,