surge refill

This commit is contained in:
Mateusz Gruszczyński
2026-05-31 23:09:24 +02:00
parent 91e91e7e47
commit 68d8ddc8d7
8 changed files with 217 additions and 198 deletions
+10
View File
@@ -1,7 +1,10 @@
from __future__ import annotations
from ._shared import *
from flask import current_app
from pathlib import Path
from ..services import operation_logs
from ..services.frontend_assets import static_hash
@bp.get("/system/disk")
def system_disk():
@@ -46,6 +49,13 @@ def system_status():
@bp.get("/static_hash")
def static_hash_get():
# Note: The frontend uses this lightweight version to detect changed static assets on mobile browsers.
value = static_hash(Path(current_app.static_folder or ""))
return ok({"static_hash": value, "version": value})
@bp.get("/health")
def health_check():
# Note: Lightweight health endpoint avoids rTorrent calls, making it safe for frequent monitoring.