feature/integracion-panel-restore-targets

This commit is contained in:
2026-06-05 10:49:05 -06:00
parent 854ffa116f
commit afb76ce4a6
20 changed files with 2022 additions and 104 deletions

View File

@@ -176,6 +176,15 @@ class JobRepository:
tuple(params)
)
@staticmethod
def delete(job_id: str):
"""
Elimina un job y su rastro de hash. Se usa para diferir un job cuando no
hay servidor de restauración activo: al borrarlo, el próximo escaneo del
FileWatcher vuelve a detectar el archivo y reintenta (G8 del plan).
"""
db.execute("DELETE FROM jobs WHERE job_id = ?", (job_id,))
@staticmethod
def exists_by_hash(source_hash: str) -> bool:
"""Verifica si existe un job con el hash dado."""