fix(worker): better client name support

This commit is contained in:
Manuel Astudillo
2023-08-09 00:06:10 +02:00
parent 6529858d3d
commit 5910f44b03
+3 -1
View File
@@ -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;