mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-14 02:00: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.rule import RuleHelper
|
||||
from app.helper.sites import SitesHelper
|
||||
from app.monitor import Monitor
|
||||
from app.scheduler import Scheduler
|
||||
from app.utils.http import RequestUtils
|
||||
from app.utils.system import SystemUtils
|
||||
@@ -363,6 +364,7 @@ def reload_module(_: User = Depends(get_current_active_superuser)):
|
||||
"""
|
||||
ModuleManager().reload()
|
||||
Scheduler().init()
|
||||
Monitor().init()
|
||||
return schemas.Response(success=True)
|
||||
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@ class Monitor(metaclass=Singleton):
|
||||
self.systemconfig = SystemConfigOper()
|
||||
|
||||
# 启动目录监控和文件整理
|
||||
self.start()
|
||||
self.init()
|
||||
|
||||
def start(self):
|
||||
def init(self):
|
||||
"""
|
||||
启动监控
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user