(progress_info)
| 259 | def _create_progress_callback(self, task_id: str, db): |
| 260 | """创建进度回调""" |
| 261 | async def callback(progress_info): |
| 262 | # 进度回调已经在流程中通过context更新了数据库 |
| 263 | # 这里主要用于日志记录 |
| 264 | logger.debug( |
| 265 | f"Task {task_id} progress: " |
| 266 | f"{progress_info.step_name} - {progress_info.overall_progress:.1f}%" |
| 267 | ) |
| 268 | return callback |
| 269 | |
| 270 | def _classify_error(self, error_message: str) -> str: |