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

Close EventSource instances #1316

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Close EventSource instances #1316

merged 4 commits into from
Nov 15, 2024

Conversation

moralejo
Copy link
Collaborator

Avoid a lot of zombie processes when using these functions repeatedly

Avoid a lot of zombie processes when using these functions repeatedly
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 93.42105% with 5 lines in your changes missing coverage. Please review.

Project coverage is 73.50%. Comparing base (9bab172) to head (bc7b13e).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lstchain/image/modifier.py 93.42% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1316   +/-   ##
=======================================
  Coverage   73.50%   73.50%           
=======================================
  Files         134      134           
  Lines       14211    14211           
=======================================
  Hits        10446    10446           
  Misses       3765     3765           

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

@maxnoe
Copy link
Member

maxnoe commented Nov 14, 2024

better directly use the context manager:

with EventSource(...) as mc_reader:
    ...

@moralejo moralejo marked this pull request as ready for review November 14, 2024 11:28
@moralejo moralejo requested a review from gabemery November 14, 2024 11:28
Copy link
Collaborator

@gabemery gabemery left a comment

Choose a reason for hiding this comment

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

I agree with this change, but also with the comment by maxnoe. So I will wait for its implementation before approving the PR.

@moralejo
Copy link
Collaborator Author

I hope I didn't mess ups with the indents... I wonder if it was really worth. I will check again later, back to Draft

@moralejo moralejo marked this pull request as draft November 14, 2024 14:57
@moralejo moralejo requested a review from gabemery November 14, 2024 22:48
@moralejo moralejo marked this pull request as ready for review November 15, 2024 06:33
@rlopezcoto rlopezcoto merged commit b9b55c8 into main Nov 15, 2024
9 checks passed
@rlopezcoto rlopezcoto deleted the close_eventsources branch November 15, 2024 07:11
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.

5 participants