MCPcopy
hub / github.com/dataelement/Clawith / _restore_supervision_status

Function _restore_supervision_status

backend/app/services/task_executor.py:157–164  ·  view source on GitHub ↗

Restore supervision task status back to pending after a failed execution.

(task_id: uuid.UUID)

Source from the content-addressed store, hash-verified

155
156
157async def _restore_supervision_status(task_id: uuid.UUID) -> None:
158 """Restore supervision task status back to pending after a failed execution."""
159 async with async_session() as db:
160 result = await db.execute(select(Task).where(Task.id == task_id))
161 task = result.scalar_one_or_none()
162 if task and task.status == "doing":
163 task.status = "pending"
164 await db.commit()

Callers 1

execute_taskFunction · 0.85

Calls 4

whereMethod · 0.80
executeMethod · 0.45
scalar_one_or_noneMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected