-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: feat/add-emergency-contacts-allowed-list
Are you sure you want to change the base?
feat(notifier): refactor selfstate heartbeaters #1117
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А я правильно понимаю, что если случайно количество чекав будет одинаковое две проверки подряд, то будет переход в ERROR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это не количество чеков, это счетчик, который увеличивается с каждой проверкой триггера, если за 2 проверки монитора счетчик не изменился, то local checker не работает, логика такая
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эту логику я не менял, просто подрефакторил
Refactor selfstate heartbeaters