mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
feat: 增加进程名设置
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import multiprocessing
|
import multiprocessing
|
||||||
import os
|
import os
|
||||||
|
import setproctitle
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
@@ -19,6 +20,9 @@ if SystemUtils.is_frozen():
|
|||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
from app.db.init import init_db, update_db
|
from app.db.init import init_db, update_db
|
||||||
|
|
||||||
|
# 设置进程名
|
||||||
|
setproctitle.setproctitle(settings.PROJECT_NAME)
|
||||||
|
|
||||||
# uvicorn服务
|
# uvicorn服务
|
||||||
Server = uvicorn.Server(Config(app, host=settings.HOST, port=settings.PORT,
|
Server = uvicorn.Server(Config(app, host=settings.HOST, port=settings.PORT,
|
||||||
reload=settings.DEV, workers=multiprocessing.cpu_count(),
|
reload=settings.DEV, workers=multiprocessing.cpu_count(),
|
||||||
|
|||||||
Reference in New Issue
Block a user