Momentary handling for background services
This commit is contained in:
parent
f5b4a6c30f
commit
8a2773a97c
1 changed files with 1 additions and 5 deletions
|
@ -21,8 +21,4 @@ if __name__ == "__main__":
|
|||
# Run API server
|
||||
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
|
||||
|
||||
# End services
|
||||
tasks = asyncio.all_tasks(loop)
|
||||
[t.cancel() for t in tasks]
|
||||
asyncio.gather(*tasks)
|
||||
loop.stop()
|
||||
# TODO: Close background services properly
|
||||
|
|
Loading…
Reference in a new issue