mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320)
This commit is contained in:
+2
-2
@@ -57,7 +57,7 @@ elif SystemUtils.is_frozen():
|
||||
|
||||
from app.factory import app
|
||||
from app.runtime.config import global_vars, settings
|
||||
from app.db.init import init_db, update_db
|
||||
from app.startup.database_initializer import init_db, update_db
|
||||
|
||||
# 设置进程名
|
||||
setproctitle.setproctitle(settings.PROJECT_NAME)
|
||||
@@ -73,7 +73,7 @@ class MoviePilotServer(uvicorn.Server):
|
||||
|
||||
# uvicorn服务
|
||||
Server = MoviePilotServer(Config(app, host=settings.HOST, port=settings.PORT,
|
||||
reload=settings.DEV, workers=multiprocessing.cpu_count() * 2 + 1,
|
||||
reload=settings.DEV, workers=settings.API_WORKERS,
|
||||
timeout_graceful_shutdown=60))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user