light poller commit3
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user