v1.2.23: lock_check three-state return (True/False/None), None→503 DB unavailable
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user