Update public source

This commit is contained in:
2026-10-16 06:27:59 +03:00
parent bac6d68fa5
commit b5789f9597
+31 -12
View File
@@ -268,6 +268,8 @@ def scanner_navigation_guard():
scanner_process = None scanner_process = None
scanner_starting = False
scanner_health = "READY" scanner_health = "READY"
scanner_stopped_at = None scanner_stopped_at = None
@@ -2374,31 +2376,44 @@ def scanner_start():
global scanner_process global scanner_process
global scanner_health global scanner_health
global scanner_stopped_at global scanner_stopped_at
global scanner_starting
with scanner_lock: with scanner_lock:
if ( if (
scanner_process is not None scanner_starting
and or
scanner_process.poll() is None (
scanner_process is not None
and
scanner_process.poll() is None
)
): ):
return redirect( return redirect(
url_for("index") url_for("index")
) )
if get_gps_test_status()["running"]: with gps_test_lock:
with scanner_lock: if (
gps_test_service is not None
and
gps_test_service.thread is not None
and
gps_test_service.thread.is_alive()
):
scanner_output.append( scanner_output.append(
"[GUI] Scanner cannot start " "[GUI] Scanner cannot start "
"while GPS test is running." "while GPS test is running."
) )
return redirect( return redirect(
url_for("index") url_for("index")
) )
scanner_starting = True
interface = request.form.get( interface = request.form.get(
"interface", "interface",
@@ -2460,6 +2475,8 @@ def scanner_start():
with scanner_lock: with scanner_lock:
scanner_starting = False
scanner_output.append( scanner_output.append(
f"[GUI] Failed to start scanner: {error}" f"[GUI] Failed to start scanner: {error}"
) )
@@ -2473,6 +2490,8 @@ def scanner_start():
scanner_process = process scanner_process = process
scanner_starting = False
scanner_health = "ACTIVE" scanner_health = "ACTIVE"
scanner_stopped_at = None scanner_stopped_at = None