Add an error log to the task.
(task_id: uuid.UUID, message: str)
| 147 | |
| 148 | |
| 149 | async def _log_error(task_id: uuid.UUID, message: str) -> None: |
| 150 | """Add an error log to the task.""" |
| 151 | logger.error(f"[TaskExec] Error for {task_id}: {message}") |
| 152 | async with async_session() as db: |
| 153 | db.add(TaskLog(task_id=task_id, content=f"❌ {message}")) |
| 154 | await db.commit() |
| 155 | |
| 156 | |
| 157 | async def _restore_supervision_status(task_id: uuid.UUID) -> None: |
no test coverage detected