Skip to content

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

fix(nuq): increase RabbitMQ expiration to prevent prefetch oscillation (#2672)

firecrawl-spring[bot]11c4cb529ea6
diff --git a/apps/api/src/services/worker/nuq.ts b/apps/api/src/services/worker/nuq.ts
index f439f7b45..58e83f98f 100644
--- a/apps/api/src/services/worker/nuq.ts
+++ b/apps/api/src/services/worker/nuq.ts
@@ -383,7 +383,7 @@ class NuQ<JobData = any, JobReturnValue = any> {
{
correlationId: job.id,
persistent: true,
- expiration: "15000", // has to expire in 15s otherwise locks will fail to be acquired for jobs that got picked up late
+ expiration: "50000", // must be less than lock reaper timeout (1 min) to minimize dead zone where jobs are expired from RabbitMQ but still "active" in DB
},
);
_logger.info("NuQ job prefetch sent", { module: "nuq/rabbitmq" });