mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-07-29 03:34:38 +02:00
Allow operators to select a Redis logical database index via the REDIS_DB environment variable. Without this, the BullMQ queue and the @adonisjs/transmit Redis transport both implicitly used db 0, causing key collisions when sharing a Redis instance across multiple services or environments. REDIS_DB is added to the env schema as an optional number; both config/queue.ts and config/transmit.ts fall back to db 0 when unset, preserving existing behavior.
12 lines
211 B
TypeScript
12 lines
211 B
TypeScript
import env from '#start/env'
|
|
|
|
const queueConfig = {
|
|
connection: {
|
|
host: env.get('REDIS_HOST'),
|
|
port: env.get('REDIS_PORT') ?? 6379,
|
|
db: env.get('REDIS_DB') ?? 0,
|
|
},
|
|
}
|
|
|
|
export default queueConfig
|