feat(plugin): 实现插件配置集中化管理
将插件配置文件从各自的插件目录迁移至项目根目录下的 `config/plugins/` 文件夹中,方便用户统一管理和修改。 主要变更: - 新增 `plugins.centralized_config` 总开关,用于控制是否启用此功能。 - 修改插件加载逻辑,现在会从 `config/plugins/<plugin_name>/` 目录读取用户配置。 - 如果用户配置不存在,会自动从插件目录下的模板配置文件复制一份。 - 保留了原有的配置版本检查和自动迁移功能,现在作用于用户配置文件。
This commit is contained in:
committed by
Windpicker-owo
parent
d30403e182
commit
9b382a9505
@@ -9,8 +9,6 @@ from src.common.logger import get_logger
|
||||
from src.plugin_system import (
|
||||
BasePlugin,
|
||||
ComponentInfo,
|
||||
BaseAction,
|
||||
BaseCommand,
|
||||
register_plugin
|
||||
)
|
||||
from src.plugin_system.base.config_types import ConfigField
|
||||
|
||||
@@ -143,10 +143,10 @@ class SchedulerService:
|
||||
|
||||
if record:
|
||||
# 如果存在,则更新状态
|
||||
record.is_processed = True
|
||||
record.processed_at = datetime.datetime.now()
|
||||
record.send_success = success
|
||||
record.story_content = content
|
||||
record.is_processed = True # type: ignore
|
||||
record.processed_at = datetime.datetime.now()# type: ignore
|
||||
record.send_success = success# type: ignore
|
||||
record.story_content = content# type: ignore
|
||||
else:
|
||||
# 如果不存在,则创建新记录
|
||||
new_record = MaiZoneScheduleStatus(
|
||||
|
||||
Reference in New Issue
Block a user