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 bug notification history repeats #117

Merged
merged 3 commits into from
Jan 13, 2022

Conversation

wanjunlei
Copy link
Collaborator

Signed-off-by: wanjunlei [email protected]

@wanjunlei wanjunlei requested a review from benjaminhuo January 12, 2022 10:34
"fmt"

jsoniter "github.com/json-iterator/go"
Copy link
Member

Choose a reason for hiding this comment

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

jsoniter is faster than encoding/json, why switching to encoding/json?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

flag := false
for _, selector := range selectors {
if utils.SelectorMatchesAlert(alert, selector) {
flag = true
Copy link
Member

Choose a reason for hiding this comment

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

break here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

}

if flag {
newData.Alerts = append(newData.Alerts, alert)
Copy link
Member

Choose a reason for hiding this comment

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

break here?

Signed-off-by: wanjunlei <[email protected]>
Signed-off-by: wanjunlei <[email protected]>
@benjaminhuo benjaminhuo merged commit 951b5e4 into kubesphere:release-1.4 Jan 13, 2022
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.

2 participants