From 9cc3047ad4a8e1db10b51379f6cedbb5d115f551 Mon Sep 17 00:00:00 2001 From: Victor Camara Lessa <33801047+victorLessa@users.noreply.github.com> Date: Thu, 22 Jun 2023 15:49:22 -0300 Subject: [PATCH] =?UTF-8?q?:bug:=20fix:=20corre=C3=A7=C3=A3o=20na=20conex?= =?UTF-8?q?=C3=A3o=20com=20o=20redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Queue.js | 2 +- test/unit/queue.spec.js | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/Queue.js b/src/Queue.js index 4819f89..7f71930 100644 --- a/src/Queue.js +++ b/src/Queue.js @@ -21,7 +21,7 @@ class Queue { const { connection, ...connections } = Config.get('bull') - this.config = { redis: connections[connection] } + this.config = connections[connection] this.connections = connections } diff --git a/test/unit/queue.spec.js b/test/unit/queue.spec.js index 17ce491..4090b04 100644 --- a/test/unit/queue.spec.js +++ b/test/unit/queue.spec.js @@ -46,18 +46,22 @@ test.group('Bull', (group) => { config.set('bull', { connection: 'bull', local: { - host: '127.0.0.1', - port: 6379, - db: 0, - password: 'redis', - keyPrefix: '', + redis: { + host: '127.0.0.1', + port: 6379, + db: 0, + password: 'redis', + keyPrefix: '', + }, }, bull: { - host: '127.0.0.1', - port: 6379, - db: 0, - password: 'redis', - keyPrefix: 'q', + redis: { + host: '127.0.0.1', + port: 6379, + db: 0, + password: 'redis', + keyPrefix: 'q', + }, }, })