feat: implementar Fases 3, 4 y 5 del roadmap (Planificacion Avanzada, Historial de Corridas y Copia Local Duplicada)

This commit is contained in:
Carlos Tello
2026-08-15 00:58:05 -03:00
parent 2c2cfeb867
commit 929f9affd7
11 changed files with 677 additions and 57 deletions
+33
View File
@@ -87,6 +87,7 @@ class JobCreate(BaseModel):
skip_system: bool = False
skip_readonly: bool = False
sync_deletions: bool = False
local_destination_path: Optional[str] = None
schedule_cron: str = "0 2 * * *"
keep_daily: int = 7
keep_weekly: int = 4
@@ -102,6 +103,7 @@ class JobUpdate(BaseModel):
skip_system: Optional[bool] = None
skip_readonly: Optional[bool] = None
sync_deletions: Optional[bool] = None
local_destination_path: Optional[str] = None
schedule_cron: Optional[str] = None
is_active: Optional[bool] = None
keep_daily: Optional[int] = None
@@ -121,6 +123,7 @@ class JobResponse(BaseModel):
skip_system: bool
skip_readonly: bool
sync_deletions: bool
local_destination_path: Optional[str]
schedule_cron: str
is_active: bool
keep_daily: int
@@ -255,6 +258,7 @@ class AgentJobRegister(BaseModel):
skip_system: bool = False
skip_readonly: bool = False
sync_deletions: bool = False
local_destination_path: Optional[str] = None
schedule_cron: str = "daily"
keep_daily: int = 7
keep_weekly: int = 4
@@ -263,3 +267,32 @@ class AgentJobRegister(BaseModel):
class PurgeOrphansRequest(BaseModel):
active_relative_paths: List[str]
# --- Job Run Schemas ---
class JobRunStartRequest(BaseModel):
client_id: int
class JobRunCompleteRequest(BaseModel):
status: str # SUCCESS, FAILED
files_scanned: int
files_copied: int
files_skipped: int
errors_count: int
bytes_transferred: int
error_summary: Optional[str] = None
class JobRunResponse(BaseModel):
id: int
job_id: int
client_id: int
started_at: datetime
completed_at: Optional[datetime]
status: str
files_scanned: int
files_copied: int
files_skipped: int
errors_count: int
bytes_transferred: int
error_summary: Optional[str]
model_config = {"from_attributes": True}