fix: create_client → get_client — POLYGON_ENDPOINT в main/api/runner (v1.2.27)

This commit is contained in:
2026-08-01 09:00:45 +04:00
parent 4a0cfcaa61
commit ca2367724e
4 changed files with 19 additions and 16 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ import threading
from flask import Blueprint, current_app, jsonify, request
from api.http_client import create_client
from api.auth import get_client
from runner import run_tests, get_status, load_config, save_config
bp = Blueprint("api", __name__)
@@ -11,10 +11,10 @@ bp = Blueprint("api", __name__)
@bp.route("/api/run", methods=["POST"])
def api_run():
token = current_app.config["NUBES_API_TOKEN"]
result = create_client(token, current_app.config["NUBES_API_ENDPOINT"])
if not result:
client = get_client()
endpoint = current_app.config["NUBES_API_ENDPOINT"]
if not client:
return jsonify({"error": "Не удалось определить стенд"}), 500
client, endpoint = result
t = threading.Thread(
target=run_tests,
args=(endpoint, token),