v1.2.23: lock_check three-state return (True/False/None), None→503 DB unavailable

This commit is contained in:
2026-07-31 18:22:58 +04:00
parent 23688da90a
commit c1e7c4f9aa
3 changed files with 9 additions and 6 deletions
+4 -1
View File
@@ -41,7 +41,10 @@ def api_scenario_run():
cid = get_client_id()
stand = get_stand()
if not lock_check(cid, stand):
can_run = lock_check(cid, stand)
if can_run is None:
return jsonify({"error": "DB unavailable"}), 503
if not can_run:
return jsonify({"error": "Another scenario is already running"}), 409
defn = get_definition(def_id, cid, stand)