MCPcopy
hub / github.com/chartbrew/chartbrew / getRedisOptions

Function getRedisOptions

server/redisConnection.js:33–49  ·  view source on GitHub ↗
(overridePrefix = null)

Source from the content-addressed store, hash-verified

31};
32
33const getRedisOptions = (overridePrefix = null) => {
34 const host = getRedisEnvValue("HOST", overridePrefix);
35 if (!host) {
36 const envKey = `${overridePrefix || "CB_REDIS"}_HOST${isProduction() ? "" : "_DEV"}`;
37 console.error(`${envKey} is not set. The charts are not going to update automatically.`); // oxlint-disable-line no-console
38 }
39
40 return {
41 host,
42 port: getRedisEnvValue("PORT", overridePrefix),
43 password: getRedisEnvValue("PASSWORD", overridePrefix),
44 db: getRedisEnvValue("DB", overridePrefix),
45 tls: getRedisEnvValue("CA", overridePrefix)
46 ? { ca: getRedisEnvValue("CA", overridePrefix) }
47 : undefined,
48 };
49};
50
51const parsePositiveInt = (value, fallback) => {
52 const parsedValue = parseInt(value, 10);

Callers 2

getQueueOptionsFunction · 0.85
setupRedisAdapterMethod · 0.85

Calls 2

getRedisEnvValueFunction · 0.85
isProductionFunction · 0.85

Tested by

no test coverage detected