Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 23, 2024
1 parent f182b8b commit 213ba8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fastserve/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def run_server(
background: bool = False,
):
import uvicorn

if background:
import threading

t = threading.Thread(target=uvicorn.run, args=(self.app,), daemon=True)
t.start()
return t
Expand Down

0 comments on commit 213ba8b

Please sign in to comment.