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 b972698 commit f03c377
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions senders/discord/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ func (sender *Sender) runBot(contactType string) {
worker.NewWorker(
workerName,
sender.logger,
sender.DataBase.NewLock(discordLock(contactType), discordLockTTL),
sender.DataBase.NewLock(discordLockKey(contactType), discordLockTTL),
workerAction,
).Run(nil)
}

func discordLock(contactType string) string {
func discordLockKey(contactType string) string {
return discordLockPrefix + contactType
}
4 changes: 2 additions & 2 deletions senders/telegram/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ func (sender *Sender) runTelebot(contactType string) {
worker.NewWorker(
workerName,
sender.logger,
sender.DataBase.NewLock(telegramLock(contactType), telegramLockTTL),
sender.DataBase.NewLock(telegramLockKey(contactType), telegramLockTTL),
workerAction,
).Run(nil)
}

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

0 comments on commit f03c377

Please sign in to comment.