stop-one: alias реплик читается параллельно, docker stop в фоне (хук < 10 с на Windows); check_dashboard проверяет Grafana публичным CA

This commit is contained in:
Alexey Bodanyuk
2026-11-28 15:06:29 +03:00
parent 4c9b0f284b
commit 920d9b5694
3 changed files with 30 additions and 17 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ def post(path: str, body: dict) -> dict:
request = urllib.request.Request(obs.GRAFANA + path, data=json.dumps(body).encode(), method="POST",
headers={"Authorization": obs._auth(), "Content-Type": "application/json"})
try:
with urllib.request.urlopen(request, timeout=60) as response:
with urllib.request.urlopen(request, timeout=60, context=obs.TLS) as response:
return json.loads(response.read())
except urllib.error.HTTPError as exc:
return json.loads(exc.read() or b"{}") | {"_status": exc.code}
@@ -33,7 +33,7 @@ def post(path: str, body: dict) -> dict:
def get(path: str) -> dict:
request = urllib.request.Request(obs.GRAFANA + path, headers={"Authorization": obs._auth()})
with urllib.request.urlopen(request, timeout=30) as response:
with urllib.request.urlopen(request, timeout=30, context=obs.TLS) as response:
return json.loads(response.read())