attaching clustered mode to an env var

This commit is contained in:
Martin McKeaveney 2023-04-28 19:09:22 +01:00
parent 9eef7acdb3
commit f73af919a7
2 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,7 @@ const environment = {
SALT_ROUNDS: process.env.SALT_ROUNDS,
REDIS_URL: process.env.REDIS_URL || "localhost:6379",
REDIS_PASSWORD: process.env.REDIS_PASSWORD || "budibase",
REDIS_CLUSTERED: process.env.REDIS_CLUSTERED || false,
MOCK_REDIS: process.env.MOCK_REDIS,
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,

View File

@ -9,10 +9,11 @@ import {
SelectableDatabase,
} from "./utils"
import * as timers from "../timers"
import environment from "../environment"
const RETRY_PERIOD_MS = 2000
const STARTUP_TIMEOUT_MS = 5000
const CLUSTERED = false
const CLUSTERED = environment.REDIS_CLUSTERED
const DEFAULT_SELECT_DB = SelectableDatabase.DEFAULT
// for testing just generate the client once