From b972698292b018ff15842dac84a1adf493b1082b Mon Sep 17 00:00:00 2001 From: almostinf Date: Wed, 22 May 2024 12:58:26 +0300 Subject: [PATCH] fix naming --- senders/discord/init.go | 10 +++++----- senders/telegram/init.go | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/senders/discord/init.go b/senders/discord/init.go index 0b0a81743..6de14ffa7 100644 --- a/senders/discord/init.go +++ b/senders/discord/init.go @@ -11,10 +11,10 @@ import ( ) const ( - messenger = "discord" - discordLockKey = "moira-discord-users:moira-bot-host:" - discordLockTTL = 30 * time.Second - workerName = "DiscordBot" + messenger = "discord" + discordLockPrefix = "moira-discord-users:moira-bot-host:" + discordLockTTL = 30 * time.Second + workerName = "DiscordBot" ) // Structure that represents the Discord configuration in the YAML file. @@ -102,5 +102,5 @@ func (sender *Sender) runBot(contactType string) { } func discordLock(contactType string) string { - return discordLockKey + contactType + return discordLockPrefix + contactType } diff --git a/senders/telegram/init.go b/senders/telegram/init.go index b963710e4..e80bc8f58 100644 --- a/senders/telegram/init.go +++ b/senders/telegram/init.go @@ -13,11 +13,11 @@ import ( ) const ( - telegramLockKey = "moira-telegram-users:moira-bot-host:" - workerName = "Telebot" - messenger = "telegram" - telegramLockTTL = 30 * time.Second - hidden = "[DATA DELETED]" + telegramLockPrefix = "moira-telegram-users:moira-bot-host:" + workerName = "Telebot" + messenger = "telegram" + telegramLockTTL = 30 * time.Second + hidden = "[DATA DELETED]" ) var ( @@ -115,5 +115,5 @@ func (sender *Sender) runTelebot(contactType string) { } func telegramLock(contactType string) string { - return telegramLockKey + contactType + return telegramLockPrefix + contactType }