Default to Uvicorn workers=1, refs #999

This commit is contained in:
Simon Willison 2020-10-08 16:16:55 -07:00
commit 86823ae6f7
3 changed files with 4 additions and 14 deletions

View file

@ -465,7 +465,9 @@ def serve(
url = "http://{}:{}/".format(host, port)
if open_browser:
webbrowser.open(url)
uvicorn.run(ds.app(), host=host, port=port, log_level="info", lifespan="on")
uvicorn.run(
ds.app(), host=host, port=port, log_level="info", lifespan="on", workers=1
)
async def check_databases(ds):