Use explicit lifestyle=on for Uvicorn, refs #873

json-post
Simon Willison 2020-06-29 08:42:50 -07:00
rodzic 35aee82c60
commit 16f592247a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -406,7 +406,7 @@ def serve(
# Start the server
if root:
print("http://{}:{}/-/auth-token?token={}".format(host, port, ds._root_token))
uvicorn.run(ds.app(), host=host, port=port, log_level="info")
uvicorn.run(ds.app(), host=host, port=port, log_level="info", lifespan="on")
async def check_databases(ds):