rename scoreSubmitUpdateClient
to subscriptionClient
so it better fits it's generic nature
This commit is contained in:
parent
3e4b946349
commit
b42a70d00a
1 changed files with 3 additions and 3 deletions
|
@ -26,10 +26,10 @@ global.DatabaseHelper = new DatabaseHelperClass(config.database.address, config.
|
||||||
|
|
||||||
async function subscribeToChannel(channelName = "", callback = function(message = "") {}) {
|
async function subscribeToChannel(channelName = "", callback = function(message = "") {}) {
|
||||||
// Dup and connect new client for channel subscription (required)
|
// Dup and connect new client for channel subscription (required)
|
||||||
const scoreSubmitUpdateClient = global.promClient.duplicate();
|
const subscriptionClient = global.promClient.duplicate();
|
||||||
await scoreSubmitUpdateClient.connect();
|
await subscriptionClient.connect();
|
||||||
// Subscribe to channel
|
// Subscribe to channel
|
||||||
await scoreSubmitUpdateClient.subscribe(channelName, callback);
|
await subscriptionClient.subscribe(channelName, callback);
|
||||||
consoleHelper.printRedis(`Subscribed to ${channelName} channel`);
|
consoleHelper.printRedis(`Subscribed to ${channelName} channel`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue