取消任务
(self, task_uuid: str)
| 92 | return _task_cancelled.get(task_uuid, False) |
| 93 | |
| 94 | def cancel_task(self, task_uuid: str): |
| 95 | """取消任务""" |
| 96 | _task_cancelled[task_uuid] = True |
| 97 | logger.info(f"任务 {task_uuid} 已标记为取消") |
| 98 | |
| 99 | def add_log(self, task_uuid: str, log_message: str): |
| 100 | """添加日志并推送到 WebSocket(线程安全)""" |
no test coverage detected