From 5910f44b03a264d979c8ade54d64d13fdc908b51 Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Wed, 9 Aug 2023 00:06:10 +0200 Subject: [PATCH] fix(worker): better client name support --- lib/worker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/worker.js b/lib/worker.js index a656a406b..da7670b59 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -13,7 +13,9 @@ module.exports = function(Queue) { return utils .isRedisReady(this.client) .then(() => { - return this.bclient.client('setname', this.clientName()); + const connectionName = this.clientName(); + this.bclient.options.connectionName = connectionName; + return this.bclient.client('setname', connectionName); }) .catch(err => { if (!clientCommandMessageReg.test(err.message)) throw err;