ci(metrics): use Pushgateway PUT for quality payload replacement
This commit is contained in:
parent
96040a3409
commit
2513cb8eb6
@ -46,7 +46,7 @@ def _post_text(url: str, payload: str, timeout_seconds: float, attempts: int, re
|
||||
req = urllib.request.Request(
|
||||
url,
|
||||
data=payload.encode("utf-8"),
|
||||
method="POST",
|
||||
method="PUT",
|
||||
headers={"Content-Type": "text/plain"},
|
||||
)
|
||||
try:
|
||||
|
||||
@ -32,7 +32,7 @@ class _GatewayHandler(http.server.BaseHTTPRequestHandler):
|
||||
self.end_headers()
|
||||
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"))
|
||||
body = self.rfile.read(size).decode("utf-8")
|
||||
self.posts.append((self.path, body))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user