Skip to content

Commit

Permalink
fix(worker): better client name support
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Aug 8, 2023
1 parent 6529858 commit 5910f44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5910f44

Please sign in to comment.