MCPcopy
hub / github.com/chartbrew/chartbrew / getQueueOptions

Function getQueueOptions

server/redisConnection.js:89–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87};
88
89const getQueueOptions = () => {
90 // Check if cluster configuration is available
91 const clusterConfig = getRedisClusterOptions();
92 const removeOnCompleteAge = parsePositiveInt(
93 process.env.CB_QUEUE_KEEP_COMPLETE_AGE_SECONDS,
94 86400
95 );
96 const removeOnCompleteCount = parsePositiveInt(
97 process.env.CB_QUEUE_KEEP_COMPLETE_COUNT,
98 1000
99 );
100 const removeOnFailAge = parsePositiveInt(
101 process.env.CB_QUEUE_KEEP_FAIL_AGE_SECONDS,
102 604800
103 );
104 const removeOnFailCount = parsePositiveInt(process.env.CB_QUEUE_KEEP_FAIL_COUNT, 5000);
105
106 return {
107 connection: clusterConfig || getRedisOptions(),
108 defaultJobOptions: {
109 attempts: 3,
110 backoff: {
111 type: "fixed",
112 delay: 5000
113 },
114 removeOnComplete: {
115 age: removeOnCompleteAge,
116 count: removeOnCompleteCount,
117 },
118 removeOnFail: {
119 age: removeOnFailAge,
120 count: removeOnFailCount,
121 },
122 },
123 settings: {
124 stalledInterval: 30000,
125 maxStalledCount: 3,
126 }
127 };
128};
129
130module.exports = {
131 getRedisOptions,

Callers 2

setUpQueuesFunction · 0.85
addSchemaUpdateJobFunction · 0.85

Calls 3

getRedisClusterOptionsFunction · 0.85
getRedisOptionsFunction · 0.85
parsePositiveIntFunction · 0.70

Tested by

no test coverage detected