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

TECH-1204 - Adding the health-check functionality to Chief-Keeper #15

Merged
merged 13 commits into from
May 17, 2023

Conversation

OleksandrUA
Copy link
Contributor

  1. Chief-Keeper starts as a loop processing blocks calling process_block() method
  2. With this PR we add @healthy decorator which once called writes current UNIX timestamp to /tmp/health.log
  3. We also add health-check.sh script which compares current UNIX timestamp with one in file /tmp/health.log
  4. If delta is more than 15 minutes exit code = 1, if less -- 0
  5. We will execute health-check.sh as ECS task health-check

return func(*args, **kwargs)

return wrapper

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the file need to be closed after writing to it ? We don't what to have a leak, or exceed the ulimit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeannettemcd thanks, when with is used Python creates a temporary context space and once Python exits from the with block/context, the file is automatically closed

@OleksandrUA OleksandrUA merged commit c1d30ab into master May 17, 2023
2 checks passed
@cristidas cristidas deleted the TECH-1204 branch May 22, 2023 10:28
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.

None yet

3 participants