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,6 +2,10 @@ class DevelopmentConfig:
|
||||
SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://admin02:LabA100102@127.0.0.1/takway?charset=utf8mb4" #mysql数据库连接配置
|
||||
REDIS_URL = "redis://:takway@127.0.0.1:6379/0" #redis数据库连接配置
|
||||
LOG_LEVEL = "DEBUG" #日志级别
|
||||
class UVICORN:
|
||||
HOST = "0.0.0.0" #uvicorn放行ip,0.0.0.0代表所有ip
|
||||
PORT = 7878 #uvicorn运行端口
|
||||
WORKERS = 24 #uvicorn进程数(通常与cpu核数相同)
|
||||
class XF_ASR:
|
||||
APP_ID = "your_app_id" #讯飞语音识别APP_ID
|
||||
API_SECRET = "your_api_secret" #讯飞语音识别API_SECRET
|
||||
|
||||
Reference in new issue
Block a user