-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add graceful timeout when shutdown #815
Conversation
else: | ||
conn.close() | ||
|
||
_shutdown = asyncio.gather(*coros, loop=loop) |
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.
What happens when coros
is empty here?
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.
I tested that as well. It doesn't matter. you can also have a try.
i think next line loop.run_until_complete(_shutdown)
just finishes immediately if coro
is empty.
Any feedback ? or can we merge this in ? |
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.
LGTM
Fix for #810
We should add graceful_shutdown_timeout, in case it hangs forever when we deploy the service.
There is an example in the issue page (#810) for reproducing.
This PR includes,
serve
gunicorn worker