From 211308eac6c343060ad5266c4844980eff267393 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;