ci(metrics): use Pushgateway PUT for quality payload replacement

This commit is contained in:
Brad Stein 2026-04-19 16:08:03 -03:00
parent 96040a3409
commit 2513cb8eb6
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ def _post_text(url: str, payload: str, timeout_seconds: float, attempts: int, re
req = urllib.request.Request( req = urllib.request.Request(
url, url,
data=payload.encode("utf-8"), data=payload.encode("utf-8"),
method="POST", method="PUT",
headers={"Content-Type": "text/plain"}, headers={"Content-Type": "text/plain"},
) )
try: try:

View File

@ -32,7 +32,7 @@ class _GatewayHandler(http.server.BaseHTTPRequestHandler):
self.end_headers() self.end_headers()
self.wfile.write(body) self.wfile.write(body)
def do_POST(self) -> None: # noqa: N802 def do_PUT(self) -> None: # noqa: N802
size = int(self.headers.get("Content-Length", "0")) size = int(self.headers.get("Content-Length", "0"))
body = self.rfile.read(size).decode("utf-8") body = self.rfile.read(size).decode("utf-8")
self.posts.append((self.path, body)) self.posts.append((self.path, body))