mirror of
https://github.com/OptimalBits/bull.git
synced 2026-07-02 08:27:43 +08:00
fix(worker): better client name support
This commit is contained in:
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user