MCPcopy
hub / github.com/bee-queue/bee-queue / makeQueue

Function makeQueue

test/queue-test.js:122–137  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

120 });
121
122 function makeQueue(...args) {
123 if (redisUrl) {
124 if (args.length === 0) {
125 args.push({});
126 }
127 if (!args[0].redis) {
128 // Note: we don't fuss with isClient(redis) because it's simpler to just
129 // add the host setting in the test code itself when redis is used
130 args[0].redis = redisUrl;
131 }
132 }
133 const queue = new Queue(ctx.queueName, ...args);
134 queue.on('error', (err) => ctx.queueErrors.push(err));
135 ctx.queues.push(queue);
136 return queue;
137 }
138
139 function handleErrors(t) {
140 if (t) return t.notThrows(handleErrors);

Callers

nothing calls this directly

Calls 1

onMethod · 0.80

Tested by

no test coverage detected