MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / hasRedisOverrides

Function hasRedisOverrides

server/redisConnection.js:16–31  ·  view source on GitHub ↗
(overridePrefix)

Source from the content-addressed store, hash-verified

14};
15
16const hasRedisOverrides = (overridePrefix) => {
17 if (!overridePrefix) return false;
18
19 const suffix = isProduction() ? "" : "_DEV";
20 return [
21 "HOST",
22 "PORT",
23 "PASSWORD",
24 "DB",
25 "CA",
26 "CLUSTER_NODES",
27 ].some((name) => {
28 const value = process.env[`${overridePrefix}_${name}${suffix}`];
29 return value !== undefined && value !== "";
30 });
31};
32
33const getRedisOptions = (overridePrefix = null) => {
34 const host = getRedisEnvValue("HOST", overridePrefix);

Callers

nothing calls this directly

Calls 1

isProductionFunction · 0.85

Tested by

no test coverage detected