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

feat(notifier): refactor selfstate heartbeaters #1117

Open
wants to merge 11 commits into
base: feat/add-emergency-contacts-allowed-list
Choose a base branch
from

Conversation

almostinf
Copy link
Member

Refactor selfstate heartbeaters

@almostinf almostinf marked this pull request as ready for review November 1, 2024 09:16
@almostinf almostinf requested a review from a team as a code owner November 1, 2024 09:16
func (check *localChecker) Check(nowTS int64) (int64, bool, error) {
defaultLocalCluster := moira.DefaultLocalCluster
triggersCount, err := check.database.GetTriggersToCheckCount(defaultLocalCluster)
// Check is a function that checks that the local checker checks triggers and the number of triggers is not constant.
Copy link
Member

Choose a reason for hiding this comment

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

А я правильно понимаю, что если случайно количество чекав будет одинаковое две проверки подряд, то будет переход в ERROR?

Copy link
Member Author

@almostinf almostinf Nov 6, 2024

Choose a reason for hiding this comment

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

Это не количество чеков, это счетчик, который увеличивается с каждой проверкой триггера, если за 2 проверки монитора счетчик не изменился, то local checker не работает, логика такая

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 changed the base branch from feat/add-emergency-contacts-api to feat/add-emergency-contacts-allowed-list November 8, 2024 11:21
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.

3 participants