mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 03:27:31 +08:00
fix reload api
This commit is contained in:
@@ -21,6 +21,7 @@ from app.helper.message import MessageHelper
|
|||||||
from app.helper.progress import ProgressHelper
|
from app.helper.progress import ProgressHelper
|
||||||
from app.helper.rule import RuleHelper
|
from app.helper.rule import RuleHelper
|
||||||
from app.helper.sites import SitesHelper
|
from app.helper.sites import SitesHelper
|
||||||
|
from app.monitor import Monitor
|
||||||
from app.scheduler import Scheduler
|
from app.scheduler import Scheduler
|
||||||
from app.utils.http import RequestUtils
|
from app.utils.http import RequestUtils
|
||||||
from app.utils.system import SystemUtils
|
from app.utils.system import SystemUtils
|
||||||
@@ -363,6 +364,7 @@ def reload_module(_: User = Depends(get_current_active_superuser)):
|
|||||||
"""
|
"""
|
||||||
ModuleManager().reload()
|
ModuleManager().reload()
|
||||||
Scheduler().init()
|
Scheduler().init()
|
||||||
|
Monitor().init()
|
||||||
return schemas.Response(success=True)
|
return schemas.Response(success=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -98,9 +98,9 @@ class Monitor(metaclass=Singleton):
|
|||||||
self.systemconfig = SystemConfigOper()
|
self.systemconfig = SystemConfigOper()
|
||||||
|
|
||||||
# 启动目录监控和文件整理
|
# 启动目录监控和文件整理
|
||||||
self.start()
|
self.init()
|
||||||
|
|
||||||
def start(self):
|
def init(self):
|
||||||
"""
|
"""
|
||||||
启动监控
|
启动监控
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user