1.配置文件中新增UVICORN类
2.UVICORN多workers实现多进程优化
This commit is contained in:
1 parent
8eb6b40f25
commit
61443c7330
2 files changed
+6
-2
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
||||
from app import app
|
||||
from app import app, Config
|
||||
import uvicorn
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(app, host="0.0.0.0", port=7878)
|
||||
uvicorn.run("app.main:app", host=Config.UVICORN.HOST, port=Config.UVICORN.PORT, workers=Config.UVICORN.WORKERS)
|
||||
Reference in new issue
Block a user