v1.1.20: fix _client() → get_client() — NameError in status polling
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ from routes.api import bp as api_bp
|
||||
from routes.api_test import bp as api_test_bp
|
||||
|
||||
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
|
||||
VERSION = "1.1.19"
|
||||
VERSION = "1.1.20"
|
||||
|
||||
app = Flask(__name__, template_folder="templates", static_folder="static")
|
||||
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
|
||||
|
||||
@@ -373,7 +373,7 @@ def api_test_status(op_uid):
|
||||
return jsonify(_op_results[op_uid])
|
||||
# иначе спрашиваем API напрямую
|
||||
try:
|
||||
data = _client().get(f"/instanceOperations/{op_uid}?fields=dtFinish,isSuccessful,errorLog,isInProgress,duration,stages")
|
||||
data = get_client().get(f"/instanceOperations/{op_uid}?fields=dtFinish,isSuccessful,errorLog,isInProgress,duration,stages")
|
||||
op = data.get("instanceOperation", {})
|
||||
dt_finish = op.get("dtFinish")
|
||||
done = bool(dt_finish and str(dt_finish).strip())
|
||||
|
||||
Reference in New Issue
Block a user