Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed May 22, 2024
1 parent c3a871b commit b972698
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions senders/discord/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -102,5 +102,5 @@ func (sender *Sender) runBot(contactType string) {
}

func discordLock(contactType string) string {
return discordLockKey + contactType
return discordLockPrefix + contactType
}
12 changes: 6 additions & 6 deletions senders/telegram/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -115,5 +115,5 @@ func (sender *Sender) runTelebot(contactType string) {
}

func telegramLock(contactType string) string {
return telegramLockKey + contactType
return telegramLockPrefix + contactType
}

0 comments on commit b972698

Please sign in to comment.