|
|
@@ -903,6 +903,18 @@ class TaskService:
|
|
|
try:
|
|
|
from app.core.config import config_handler
|
|
|
|
|
|
+ # 强制重新加载配置文件
|
|
|
+ import os
|
|
|
+ current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
+ config_file = os.path.join(current_dir, '..', 'config', 'config.ini')
|
|
|
+ config_file = os.path.abspath(config_file)
|
|
|
+
|
|
|
+ logger.info(f"配置文件路径: {config_file}")
|
|
|
+ logger.info(f"配置文件是否存在: {os.path.exists(config_file)}")
|
|
|
+
|
|
|
+ # 重新读取配置文件
|
|
|
+ config_handler.config.read(config_file, encoding='utf-8')
|
|
|
+
|
|
|
# 调试: 检查配置文件是否正确加载
|
|
|
logger.info(f"配置文件sections: {config_handler.config.sections()}")
|
|
|
|