sync errors

This commit is contained in:
2026-05-10 18:02:06 +02:00
parent e754b14085
commit 96e555de0a
5 changed files with 154 additions and 23 deletions
+11
View File
@@ -63,6 +63,7 @@ async def dashboard(request: Request):
zips = [dict(z) for z in db.get_recent_zips(20)]
interval = int(db.get_setting("scheduler_interval_minutes", "0") or "0")
batch_size = int(db.get_setting("sync_batch_size", "0") or "0")
cache_info = db.get_remote_cache_info()
return templates.TemplateResponse(request, "index.html", {
"stats": stats,
"runs": runs,
@@ -71,6 +72,7 @@ async def dashboard(request: Request):
"next_run": next_run_time(),
"interval": interval,
"batch_size": batch_size,
"cache_info": cache_info,
})
@@ -158,6 +160,15 @@ async def trigger_test_sync(background_tasks: BackgroundTasks):
return RedirectResponse("/?test_started=1", status_code=303)
@app.post("/sync/rescan")
async def trigger_rescan(background_tasks: BackgroundTasks):
if sync.is_running():
return RedirectResponse("/?already_running=1", status_code=303)
cfg = config.load()
background_tasks.add_task(sftp_module.refresh_remote_zip_cache, cfg.sftp)
return RedirectResponse("/?rescan_started=1", status_code=303)
# --- Connection tests ---
@app.get("/api/test/ssh")