-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add zenduty integration #67
Conversation
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.
Looks good to me. Please address my inline comments before merging.
Can you also add some descriptions about this alert type + the env variables needed for it in the readme?
pyth_observer/zenduty.py
Outdated
f"Received 429 Too Many Requests for {alert_identifier}. Retrying in 1 second..." | ||
) | ||
await asyncio.sleep( | ||
min(30, 2 ^ retries) |
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.
i think this does the xor, should be 2**retries
Adds a Zenduty Event type, which requires us to manually resolve an incident once it surpasses so I have added logic to monitor open alerts and resolve them if the last alert was > 2 minutes ago. Open alerts are written to a file for persistence across app restarts, so we don't end up with orphaned unresolved incidents.