Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(api): add missing await to logScrape causing GCS race condition (#2847)

firecrawl-spring[bot]c95ef16d2c57
diff --git a/apps/api/src/services/worker/scrape-worker.ts b/apps/api/src/services/worker/scrape-worker.ts
index f88957362..965cb7261 100644
--- a/apps/api/src/services/worker/scrape-worker.ts
+++ b/apps/api/src/services/worker/scrape-worker.ts
@@ -538,7 +538,7 @@ async function processJob(job: NuQJob<ScrapeJobSingleUrls>) {
doc.metadata.creditsUsed = credits_billed ?? undefined;
- logScrape(
+ await logScrape(
{
id: job.id,
request_id: job.data.requestId ?? job.data.crawl_id ?? job.id,
@@ -555,11 +555,6 @@ async function processJob(job: NuQJob<ScrapeJobSingleUrls>) {
skipNuq: job.data.skipNuq ?? false,
},
false,
- ).catch(err =>
- logger.warn("Background scrape log failed", {
- error: err,
- jobId: job.id,
- }),
);
}