-
Notifications
You must be signed in to change notification settings - Fork 25
feat: support shutdown_callback argument in XXXAsyncServer #311
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kazuki Yamamoto <yamamoto.kazuki.24@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #311 +/- ##
==========================================
+ Coverage 94.00% 94.05% +0.05%
==========================================
Files 66 66
Lines 3053 3080 +27
Branches 156 156
==========================================
+ Hits 2870 2897 +27
Misses 136 136
Partials 47 47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vigith
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.shutdwon_callback = shutdown_callbackplease fix the typo here and at the usage sites too?
| so that all the async coroutines can be started from a single context | ||
| """ | ||
| aiorun.run(self.aexec(), use_uvloop=True) | ||
| aiorun.run(self.aexec(), use_uvloop=True, shutdown_callback=self.shutdwon_callback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| aiorun.run(self.aexec(), use_uvloop=True, shutdown_callback=self.shutdwon_callback) | |
| aiorun.run(self.aexec(), use_uvloop=True, shutdown_callback=self.shutdown_callback) |
typo
| to the aexec so that all the async coroutines can be started from a single context | ||
| """ | ||
| aiorun.run(self.aexec(), use_uvloop=True) | ||
| aiorun.run(self.aexec(), use_uvloop=True, shutdown_callback=self.shutdwon_callback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| aiorun.run(self.aexec(), use_uvloop=True, shutdown_callback=self.shutdwon_callback) | |
| aiorun.run(self.aexec(), use_uvloop=True, shutdown_callback=self.shutdown_callback) |
typo
| self.max_threads = min(max_threads, MAX_NUM_THREADS) | ||
| self.max_message_size = max_message_size | ||
| self.server_info_file = server_info_file | ||
| self.shutdwon_callback = shutdown_callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.shutdwon_callback = shutdown_callback | |
| self.shutdown_callback = shutdown_callback |
| self.max_threads = min(max_threads, MAX_NUM_THREADS) | ||
| self.max_message_size = max_message_size | ||
| self.server_info_file = server_info_file | ||
| self.shutdwon_callback = shutdown_callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.shutdwon_callback = shutdown_callback | |
| self.shutdown_callback = shutdown_callback |
Signed-off-by: Kazuki Yamamoto <yamamoto.kazuki.24@gmail.com>
|
Can you please make the same change in the remaining files as well to make the API consistent?
Also, please update the documentation comment for this parameter (within the class or under |
- Also, update the documentation comment for this parameter Signed-off-by: Kazuki Yamamoto <yamamoto.kazuki.24@gmail.com>
As discussed in #310, I updated the following code in accordance with the proposed solution.