feat: voortgang copy/duplicate/move in headerbar
This commit is contained in:
@@ -119,6 +119,27 @@ class HistoryRepository:
|
||||
),
|
||||
)
|
||||
|
||||
def reconcile_entries_failed(
|
||||
self,
|
||||
entry_ids: list[str],
|
||||
*,
|
||||
error_code: str = "task_interrupted",
|
||||
error_message: str = "Task was interrupted before completion",
|
||||
) -> None:
|
||||
if not entry_ids:
|
||||
return
|
||||
finished_at = self._now_iso()
|
||||
placeholders = ", ".join("?" for _ in entry_ids)
|
||||
with self._connection() as conn:
|
||||
conn.execute(
|
||||
f"""
|
||||
UPDATE history
|
||||
SET status = ?, error_code = ?, error_message = ?, finished_at = ?
|
||||
WHERE id IN ({placeholders})
|
||||
""",
|
||||
("failed", error_code, error_message, finished_at, *entry_ids),
|
||||
)
|
||||
|
||||
def _ensure_schema(self) -> None:
|
||||
db_path = Path(self._db_path)
|
||||
if db_path.parent and str(db_path.parent) not in {"", "."}:
|
||||
|
||||
Reference in New Issue
Block a user