Skip to content

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

fix(crawl-redis/finishCrawl): increase logging to hunt down race condition

Gergő Móricz13abb2bc0e17
diff --git a/apps/api/src/lib/crawl-redis.ts b/apps/api/src/lib/crawl-redis.ts
index 5868c28a8..add189ba7 100644
--- a/apps/api/src/lib/crawl-redis.ts
+++ b/apps/api/src/lib/crawl-redis.ts
@@ -157,6 +157,9 @@ export async function finishCrawl(id: string) {
module: "crawl-redis",
method: "finishCrawl",
crawlId: id,
+ jobs_done: (await redisConnection.scard("crawl:" + id + ":jobs_done")),
+ jobs: (await redisConnection.scard("crawl:" + id + ":jobs")),
+ kickoff_finished: (await redisConnection.get("crawl:" + id + ":kickoff:finish")) !== null,
});
}
}