-
-
Notifications
You must be signed in to change notification settings - Fork 760
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 --timeout-graceful-shutdown
parameter
#1950
Add --timeout-graceful-shutdown
parameter
#1950
Conversation
4450676
to
dbb5d96
Compare
use Event instead of sleep
dbb5d96
to
36ef166
Compare
293e891
to
47c9357
Compare
This comment was marked as outdated.
This comment was marked as outdated.
32c56d2
to
b6440dc
Compare
Thanks @JonasKs 🙏 |
--timeout-graceful-shutdown
parameter
Hmm, didn't really intend for this to work well with --reload, but I can see why you would want it. I'll have to look further into it, but I won't be able to until the weekend. Please help investigate if you have time. |
What happened with that comment, @Kludex ? I tried looking back to find what it was all about again.. |
I don't know. I don't delete my comments. Was it a comment from someone else? |
Yeah, someone said it didn't work properly with --reload I believe. I'll test some more this weekend, I don't really remember 😅 |
The parameter works fine with --reload, e.g.
Hopefully this is not too offtopic, but hopefully useful someone ends up here looking for information like I just did. |
That's a good tip, should probably be documented. Potentially --reload should set it to 0 by default. |
Summary
This is a continuation of #1824, which intend to close:
Checklist
The
running_in_executor
-tasks problem:As of 1b3e737, I've removed cancellation of tasks running in
executors
such as those spawned throughrun_in_executor
by usingos._exit(1)
.The implementation worked, but unfortunately, it crashes a lot of tests (fixable), but I am also unable to actually make a test for it, and therefor I'm unsure if it will work on all platforms.
The `os._exit` implementation
Given
main.py
, and commit 4b703e3:`main.py`
How ever, I'm unable to test it. The test below will finish immediately as expected, but the pytest process will run for 10 seconds.
Test file