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

Adapt server to support close and run forever #67

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

tobiasah
Copy link
Member

This commit adapts the capnp server class to support the close method and run forever method. The close method is used to stop a running server safely. Since Python does not gurantee that the destructor is called it is recommended to manage the livetime by one self. The run forever method is a simple helper function that is often usefull if a server is running in the main thread.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 27.27273% with 24 lines in your changes missing coverage. Please review.

Project coverage is 94.26%. Comparing base (a7f73f8) to head (afc5769).
Report is 1 commits behind head on main.

Files Patch % Lines
src/labone/server/server.py 22.58% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
- Coverage   95.81%   94.26%   -1.56%     
==========================================
  Files          26       26              
  Lines        1433     1464      +31     
  Branches      230      235       +5     
==========================================
+ Hits         1373     1380       +7     
- Misses         48       72      +24     
  Partials       12       12              

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

This commit adapts the capnp server class to support the close
method and run forever method. The close method is used to
stop a running server safely. Since Python does not gurantee that
the destructor is called it is recommended to manage the livetime
by one self. The run forever method is a simple helper function
that is often usefull if a server is running in the main thread.
@tobiasah tobiasah merged commit 9b506b3 into main Jul 23, 2024
10 checks passed
@tobiasah tobiasah deleted the tobiasa/server_adaptions branch September 19, 2024 11:13
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.

2 participants