Update public source
This commit is contained in:
+21
-2
@@ -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,22 +2376,33 @@ 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_starting
|
||||||
|
or
|
||||||
|
(
|
||||||
scanner_process is not None
|
scanner_process is not None
|
||||||
and
|
and
|
||||||
scanner_process.poll() is None
|
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 "
|
||||||
@@ -2400,6 +2413,8 @@ def scanner_start():
|
|||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user