-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework status api and drop cache stats since they were per process
The issue with cache htis/misses was that they were collected per process which made them useless when using gunicorn. Signed-off-by: Alexis Jeandet <[email protected]>
- Loading branch information
Showing
6 changed files
with
18 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from fastapi.responses import JSONResponse | ||
from .routes import router | ||
from fastapi.encoders import jsonable_encoder | ||
import logging | ||
from speasy_proxy.backend import status | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
@router.get('/get_server_status', description='Get server status', response_class=JSONResponse) | ||
async def get_server_status(): | ||
log.debug(f'Client asking for server status') | ||
return JSONResponse(content=jsonable_encoder(status())) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters