Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(queue-status): read most-recent-success from the Redis it is written to (#3819)
firecrawl-spring[bot]14481332bbbf
diff --git a/apps/api/src/controllers/v1/queue-status.ts b/apps/api/src/controllers/v1/queue-status.tsindex eac91e419..3a4c965bb 100644--- a/apps/api/src/controllers/v1/queue-status.ts+++ b/apps/api/src/controllers/v1/queue-status.ts@@ -2,7 +2,7 @@ import { RateLimiterMode } from "../../types";import { getACUCTeam } from "../auth";import { AuthCreditUsageChunkFromTeam, RequestWithAuth } from "./types";import { Response } from "express";-import { getRedisConnection } from "../../services/queue-service";+import { redisEvictConnection } from "../../services/redis";import { isFdbTeam } from "../../services/worker/nuq-router";import {nuqFdbHealthCheck,@@ -82,7 +82,10 @@ export async function queueStatusController(}}- const mostRecentSuccess = await getRedisConnection().get(+ // most-recent-success is written by the scrape worker via redisEvictConnection+ // (REDIS_EVICT_URL), which is a different instance from getRedisConnection()+ // (REDIS_URL). Read it from the same connection it is written to.+ const mostRecentSuccess = await redisEvictConnection.get("most-recent-success:" + req.auth.team_id,);diff --git a/apps/api/src/controllers/v2/queue-status.ts b/apps/api/src/controllers/v2/queue-status.tsindex 297e625b5..b71773669 100644--- a/apps/api/src/controllers/v2/queue-status.ts+++ b/apps/api/src/controllers/v2/queue-status.ts@@ -3,7 +3,7 @@ import { getACUCTeam } from "../auth";import { RequestWithAuth } from "./types";import { AuthCreditUsageChunkFromTeam } from "../v1/types";import { Response } from "express";-import { getRedisConnection } from "../../services/queue-service";+import { redisEvictConnection } from "../../services/redis";import { isFdbTeam } from "../../services/worker/nuq-router";import {nuqFdbHealthCheck,@@ -83,7 +83,10 @@ export async function queueStatusController(}}- const mostRecentSuccess = await getRedisConnection().get(+ // most-recent-success is written by the scrape worker via redisEvictConnection+ // (REDIS_EVICT_URL), which is a different instance from getRedisConnection()+ // (REDIS_URL). Read it from the same connection it is written to.+ const mostRecentSuccess = await redisEvictConnection.get("most-recent-success:" + req.auth.team_id,);