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

DSEGOG-307 Kill API Instances Cleanly in Echo Ingest Script #113

Merged
merged 3 commits into from
May 24, 2024

Conversation

MRichards99
Copy link
Collaborator

This is a small change to improve the Echo ingestion script. It used to not kill the API at the end of the script so the processes needed to be manually killed - the problem would often occur when you launch the API using poetry run and it would complain the address is already in use.

To make this better, the kill function now uses lsof to pinpoint all processes attached to the port used for the API, puts those PIDs into a list and uses the standard library os.kill() to kill them one by one.

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.33%. Comparing base (58c286f) to head (ce12fd8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #113   +/-   ##
=======================================
  Coverage   91.33%   91.33%           
=======================================
  Files          47       47           
  Lines        2446     2446           
  Branches      197      197           
=======================================
  Hits         2234     2234           
  Misses        186      186           
  Partials       26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MRichards99
Copy link
Collaborator Author

Just merged main in so the CI passes (safety job was failing)

@MRichards99 MRichards99 merged commit 477297a into main May 24, 2024
7 checks passed
@MRichards99 MRichards99 deleted the DSEGOG-307-echo-script-kill branch May 24, 2024 12:22
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