mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
fix(plugin): 调整判断顺序
This commit is contained in:
+7
-5
@@ -418,19 +418,21 @@ class Settings(BaseSettings, ConfigModel, LogConfigModel):
|
|||||||
更新多个配置项
|
更新多个配置项
|
||||||
"""
|
"""
|
||||||
results = {}
|
results = {}
|
||||||
log_updated = False
|
log_updated, plugin_monitor_updated = False, False
|
||||||
for k, v in env.items():
|
for k, v in env.items():
|
||||||
results[k] = self.update_setting(k, v)
|
results[k] = self.update_setting(k, v)
|
||||||
if hasattr(log_settings, k):
|
if hasattr(log_settings, k):
|
||||||
log_updated = True
|
log_updated = True
|
||||||
|
|
||||||
if k in ["PLUGIN_AUTO_RELOAD", "DEV"]:
|
if k in ["PLUGIN_AUTO_RELOAD", "DEV"]:
|
||||||
# 解决顶层循环导入问题
|
plugin_monitor_updated = True
|
||||||
from app.core.plugin import PluginManager
|
|
||||||
PluginManager().reload_monitor()
|
|
||||||
# 本次更新存在日志配置项更新,需要重新加载日志配置
|
# 本次更新存在日志配置项更新,需要重新加载日志配置
|
||||||
if log_updated:
|
if log_updated:
|
||||||
logger.update_loggers()
|
logger.update_loggers()
|
||||||
|
# 本次更新存在插件监控配置项更新,需要重新加载插件监控
|
||||||
|
if plugin_monitor_updated:
|
||||||
|
# 解决顶层循环导入问题
|
||||||
|
from app.core.plugin import PluginManager
|
||||||
|
PluginManager().reload_monitor()
|
||||||
return results
|
return results
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user