rename scoreSubmitUpdateClient to subscriptionClient so it better fits it's generic nature

This commit is contained in:
Holly Stubbs 2022-06-28 00:27:07 +01:00
parent 3e4b946349
commit b42a70d00a
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E

View file

@ -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`);
} }