stop-one: alias реплик читается параллельно, docker stop в фоне (хук < 10 с на Windows); check_dashboard проверяет Grafana публичным CA
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user