From 443dafb439386fe9a52ac5883ef90f9c07b45203 Mon Sep 17 00:00:00 2001 From: niftylettuce Date: Tue, 26 May 2020 00:47:47 -0500 Subject: [PATCH] fix: setMaxListeners by default to 15 --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 8832795..beb8be1 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,8 @@ class Bull { prefix: `bull_${( process.env.NODE_ENV || 'development' ).toLowerCase()}` - } + }, + queueMaxListeners: 15 }, config ); @@ -261,6 +262,8 @@ class Bull { // queue.removeAllListeners('error'); + queue.setMaxListeners(this.config.queueMaxListeners); + queue .on('error', err => { this.config.logger.error(err, this.getMeta({ queue }));