executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
nestjs-bullmqImplement BullMQ job workflows in NestJS. Use when building queue processors, redis-throttler, Upstash limits, idle polling, stalled jobs, and retention policies.
Independent GitHub snapshot · Automated classification · Original documentation governs
drainDelay + stalledInterval + maxStalledCount to every @Processor. Default drainDelay (5 ms) burns 570M Redis commands/day at idle. See patterns.md.BaseProcessor instead of WorkerHost to rate-limit these logs. See patterns.md.removeOnComplete, removeOnFail, attempts, backoff to every BullModule.registerQueue. See patterns.md.src/common/constants/bull-queue.constants.ts. Key constants: QUEUE_DRAIN_DELAY_MS (10 000 ms), QUEUE_STALLED_INTERVAL_MS (60 000 ms). Use getSharedBullQueueOptions helper for registerQueue. Queue/job names go in {feature}.constants.ts. Never inline magic numbers.queue.add(): Persist DB record first, then enqueue inside try-catch. Redis errors must not surface as 500s. See patterns.md.ThrottlerGuard registered as global APP_GUARD — Redis blip propagates errors to ALL HTTP routes. RedisThrottlerStorage.increment() must catch all Redis errors and return fail-open pass-through record. Redis blip must not kill all HTTP routes. See patterns.md.isRedisEnabled() conditional + mock token pattern in every module. NestJS DI throws on startup without mock.@Processor(NAME): Always pass worker options object with drainDelay and stalledInterval.WorkerHost extension: Always extend BaseProcessor instead to intercept and rate-limit worker errors.registerQueue without defaultJobOptions: Omitting causes unbounded Redis memory growth.bull-queue.constants.ts — never write 10_000, 60_000, 50, 20, 3, or 5_000 directly.queue.add(): Wrap in try-catch; persist DB state first.getQueueToken mock when redisEnabled = false.