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

Retain state #66

Merged
merged 9 commits into from
Feb 26, 2024
Merged

Retain state #66

merged 9 commits into from
Feb 26, 2024

Conversation

dstathis
Copy link
Contributor

Issue

Fixes #53

Solution

On graceful shutdown, we save the state of the clients and reload them on start.

Testing Instructions

  • Enable wait_for_first_connection=True
  • Restart cos-alerter with sigterm
  • Ensure that wait for first connection does not take effect for clients that existed before

Copy link
Contributor

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

lgtm! couple of minor suggestions

cos_alerter/alerter.py Show resolved Hide resolved
cos_alerter/alerter.py Outdated Show resolved Hide resolved
@dstathis dstathis merged commit 927d69b into main Feb 26, 2024
7 checks passed
@dstathis dstathis deleted the retain_state branch February 26, 2024 12:41
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.

Last Heartbeat and Status are lost after app restart
2 participants