When opts is a URL string ("redis://localhost:6380" via as unknown as ConnectionOptions), Object.assign only copies character-index properties from the string — the default port 6379 was never overridden, causing ECONNREFUSED 127.0.0.1:6379 on every startup despite VALKEY_URL=redis://localhost:6380 being set.
Fix
getConnection() in apps/gateway/src/queue/queue.service.ts now parses VALKEY_URL with new URL() and returns a plain { host, port, ... }RedisOptions object that Object.assign merges correctly.
Also includes
pnpm install was needed after monorepo consolidation (#331) added packages/forge — ran it and committed the missing plugins/macp prettier formatting that was blocking format:check.
## Problem
BullMQ v5.71.0 `RedisConnection` constructor does:
```js
Object.assign({ port: 6379, host: "127.0.0.1" }, opts)
```
When `opts` is a URL string (`"redis://localhost:6380"` via `as unknown as ConnectionOptions`), `Object.assign` only copies character-index properties from the string — the default port `6379` was never overridden, causing `ECONNREFUSED 127.0.0.1:6379` on every startup despite `VALKEY_URL=redis://localhost:6380` being set.
## Fix
`getConnection()` in `apps/gateway/src/queue/queue.service.ts` now parses `VALKEY_URL` with `new URL()` and returns a plain `{ host, port, ... }` `RedisOptions` object that `Object.assign` merges correctly.
## Also includes
- `pnpm install` was needed after monorepo consolidation (#331) added `packages/forge` — ran it and committed the missing `plugins/macp` prettier formatting that was blocking `format:check`.
BullMQ v5 RedisConnection constructor does:
Object.assign({ port: 6379, host: '127.0.0.1' }, opts)
When opts is a URL string (via 'as unknown as ConnectionOptions'),
Object.assign only copies character-index properties from the string,
so the default port 6379 was never overridden — causing ECONNREFUSED
against the wrong port instead of the configured 6380.
Fix: parse VALKEY_URL with new URL() and return a plain RedisOptions
object { host, port, ... } so Object.assign merges it correctly.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
BullMQ v5.71.0
RedisConnectionconstructor does:When
optsis a URL string ("redis://localhost:6380"viaas unknown as ConnectionOptions),Object.assignonly copies character-index properties from the string — the default port6379was never overridden, causingECONNREFUSED 127.0.0.1:6379on every startup despiteVALKEY_URL=redis://localhost:6380being set.Fix
getConnection()inapps/gateway/src/queue/queue.service.tsnow parsesVALKEY_URLwithnew URL()and returns a plain{ host, port, ... }RedisOptionsobject thatObject.assignmerges correctly.Also includes
pnpm installwas needed after monorepo consolidation (#331) addedpackages/forge— ran it and committed the missingplugins/macpprettier formatting that was blockingformat:check.BullMQ v5 RedisConnection constructor does: Object.assign({ port: 6379, host: '127.0.0.1' }, opts) When opts is a URL string (via 'as unknown as ConnectionOptions'), Object.assign only copies character-index properties from the string, so the default port 6379 was never overridden — causing ECONNREFUSED against the wrong port instead of the configured 6380. Fix: parse VALKEY_URL with new URL() and return a plain RedisOptions object { host, port, ... } so Object.assign merges it correctly.