Skip to content
Snippets Groups Projects
Commit ce36929d authored by Jan Hartig's avatar Jan Hartig
Browse files

Merge branch 'dev' into 'main'

Fix metrics stuff

See merge request !6
parents 56b9da6c 2dd3b9f8
No related branches found
No related tags found
1 merge request!6Fix metrics stuff
Pipeline #26132 passed
...@@ -107,11 +107,16 @@ def main(end): ...@@ -107,11 +107,16 @@ def main(end):
try: try:
try: try:
auth = HTTPBasicAuth(config["METRICS"]["USER"], config["MONITORING"]["PASS"]) auth = HTTPBasicAuth(config["METRICS"]["USER"], config["METRICS"]["PASS"])
except KeyError: except KeyError:
auth = None auth = None
requests.post(config["METRICS"]["URL"], json=metrics, auth=auth) r = requests.post(config["METRICS"]["URL"], json=metrics, auth=auth)
try:
r.raise_for_status()
except requests.HTTPError as e:
print("[MAILSERVICE] Could not send metrics to server: {}".format(e))
except KeyError: except KeyError:
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment