Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(senders): fix workers lock key in discord and telegram #1027

Merged
merged 6 commits into from
May 22, 2024

Conversation

almostinf
Copy link
Member

Added the ability to make multiple telegram and discord senders

Fixed a bug with the same lock in telegram and discord senders when creating multiple senders

@almostinf almostinf requested a review from a team as a code owner May 15, 2024 15:16
@almostinf
Copy link
Member Author

/build

@almostinf
Copy link
Member Author

/build

discordLockTTL = 30 * time.Second
workerName = "DiscordBot"
messenger = "discord"
discordLockKey = "moira-discord-users:moira-bot-host:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мб так? Или у нас есть какая-то конвенция именования таких префиксов?

Suggested change
discordLockKey = "moira-discord-users:moira-bot-host:"
discordLockPrefix = "moira-discord-users:moira-bot-host:"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поменял

workerAction,
).Run(nil)
}

func discordLock(name string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тогда тут можно будет так

Suggested change
func discordLock(name string) string {
func discordLockKey(name string) string {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поменял

messenger = "telegram"
telegramLockTTL = 30 * time.Second
hidden = "[DATA DELETED]"
telegramLockKey = "moira-telegram-users:moira-bot-host:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Аналогично

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поменял

@almostinf almostinf requested a review from Tetrergeru May 22, 2024 10:00
@almostinf almostinf merged commit 6866623 into master May 22, 2024
6 checks passed
@almostinf almostinf deleted the fix/worker-senders-key branch May 22, 2024 10:35
Copy link

Build and push Docker images with tag: 2024-05-22.6866623

2 similar comments
Copy link

Build and push Docker images with tag: 2024-05-22.6866623

Copy link

Build and push Docker images with tag: 2024-05-22.6866623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants