light poller commit3

This commit is contained in:
Mateusz Gruszczyński
2026-05-27 15:13:22 +02:00
parent 054c9122f8
commit a8adee0f2f
6 changed files with 143 additions and 4 deletions

View File

@@ -253,6 +253,18 @@ def cleanup_automations():
@bp.post("/cleanup/poller-diagnostics")
def cleanup_poller_diagnostics():
profile = preferences.active_profile()
if not profile:
return jsonify({"ok": False, "error": "No profile"}), 400
profile_id = int(profile["id"])
# Note: This cleanup clears only in-memory poller diagnostics; polling, settings and torrent state are preserved.
runtime = poller_control.reset_runtime_stats(profile_id)
return ok({"deleted": {"poller_runtime_counters": 1}, "runtime": runtime, "cleanup": cleanup_summary()})
@bp.post("/cleanup/all")
def cleanup_all():
deleted_jobs = clear_jobs()