chore: Remove max listener warning in console

This commit is contained in:
Tom Moor
2020-04-26 14:08:39 -07:00
parent 187be4737e
commit d914ecb603

View File

@ -4,4 +4,10 @@ import Redis from 'ioredis';
const client = new Redis(process.env.REDIS_URL);
const subscriber = new Redis(process.env.REDIS_URL);
// More than the default of 10 listeners is expected for the amount of queues
// we're running. Increase the max here to prevent a warning in the console:
// https://github.com/OptimalBits/bull/issues/1192
client.setMaxListeners(100);
subscriber.setMaxListeners(100);
export { client, subscriber };