Skip to content

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

feat(nuq): fix per-message TTL on prefetch

Gergő Móricz32e808563ed9
diff --git a/apps/api/src/services/worker/nuq.ts b/apps/api/src/services/worker/nuq.ts
index 2e20925fc..62c679fb4 100644
--- a/apps/api/src/services/worker/nuq.ts
+++ b/apps/api/src/services/worker/nuq.ts
@@ -281,7 +281,7 @@ class NuQ<JobData = any, JobReturnValue = any> {
{
correlationId: job.id,
persistent: true,
- expiration: "30000",
+ expiration: "15000", // has to expire in 15s otherwise locks will fail to be acquired for jobs that got picked up late
},
);
_logger.info("NuQ job prefetch sent", { module: "nuq/rabbitmq" });