mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +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.
15 lines
371 B
TypeScript
15 lines
371 B
TypeScript
import env from '#start/env'
|
|
import { defineConfig } from '@adonisjs/transmit'
|
|
import { redis } from '@adonisjs/transmit/transports'
|
|
|
|
export default defineConfig({
|
|
pingInterval: '30s',
|
|
transport: {
|
|
driver: redis({
|
|
host: env.get('REDIS_HOST'),
|
|
port: env.get('REDIS_PORT'),
|
|
db: env.get('REDIS_DB') ?? 0,
|
|
keyPrefix: 'transmit:',
|
|
})
|
|
}
|
|
}) |