-
Notifications
You must be signed in to change notification settings - Fork 252
add shutdown endpoint w/ test #507
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
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #507 +/- ##
===================================
Coverage 86% 86%
===================================
Files 37 37
Lines 2359 2373 +14
===================================
+ Hits 2033 2046 +13
- Misses 326 327 +1 🚀 New features to boost your workflow:
|
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.
Thanks @kumarrah2002!! looks good so far. added a small comment. also can you paste the whole terminal trace after shutdown please? we would want to make sure that it also terminates all the inference processes.
|
Hi @aniketmaurya, is this a good terminal trace? Let me know if you'd like anything else added. I've also added a second POST request in the test with a 400 error code. |
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.
love this! thanks for the contribution @kumarrah2002
This reverts commit 7fcbdfb.

What does this PR do?
As a user, I want the ability to shutdown a LitServe server programmatically instead of force quitting. This pull request adds a POST endpoint to the Uvicorn server (labeled /shutdown) which terminates the server using FastAPI's built-in
.should_exit()function. A unit test has also been added, which has passed.Fixes Issue #505.
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
Did you have fun?
This was a good challenge for me! I initially had some issues since exceptions were still arising when stopping the server, but I was able to find a way so there were no exceptions.