diff --git a/.idea/claudeCodeTabState.xml b/.idea/claudeCodeTabState.xml new file mode 100644 index 0000000..17be61b --- /dev/null +++ b/.idea/claudeCodeTabState.xml @@ -0,0 +1,20 @@ + + + + + + \ No newline at end of file diff --git a/src/gasflux/app.py b/src/gasflux/app.py index 8cb0788..b0ec4b2 100644 --- a/src/gasflux/app.py +++ b/src/gasflux/app.py @@ -397,20 +397,11 @@ def process_data_async(task_id, data_path, config_path, job_output_dir): logger.error(f"Job {task_id}: Failed to load config from {config_path}: {str(e)}") raise - # 根据配置 output_dir 更新目录 - Config.update_directories_from_config(config_path) + # 不再全局覆盖 Config 类属性(避免多用户并发冲突) + # 每个任务使用独立目录,基础路径由 INI 配置决定,task_id 保证隔离 + # Config.update_directories_from_config(config_path) ← 已移除 - # 将更新后的目录同步到 app.config - app.config['UPLOAD_FOLDER'] = Config.UPLOAD_FOLDER - app.config['OUTPUT_FOLDER'] = Config.OUTPUT_FOLDER - - # 任务状态持久化现在仅使用 SQLite - # JSON 持久化已禁用 - # from .shared import set_task_status_file_path, load_task_status_from_file - # set_task_status_file_path(Config.OUTPUT_FOLDER / "task_status.json") - # load_task_status_from_file() - - # 更新任务目录到正确的基于配置的路径下 + # 使用 INI 配置的基础目录 + task_id 构建任务专属路径 from pathlib import Path job_upload_dir = Path(Config.UPLOAD_FOLDER) / task_id job_output_dir = Path(Config.OUTPUT_FOLDER) / task_id