Adjust error handling for missing prometheus endpoint: error is logged not raised

This commit is contained in:
Julius Unverfehrt 2022-03-22 15:38:15 +01:00
parent 1b1da50faf
commit 004c5fa805
2 changed files with 8 additions and 9 deletions

View File

@ -7,14 +7,13 @@ from pyinfra.locations import CONFIG_FILE
def make_art():
return """
______ _____ __
| ___ \ |_ _| / _|
| |_/ / _ | | _ __ | |_ _ __ __ _
| __/ | | || || '_ \| _| '__/ _` |
| | | |_| || || | | | | | | | (_| |
\_| \__, \___/_| |_|_| |_| \__,_|
__/ |
|___/
___ _ _ ___ __
o O O | _ \ | || | |_ _| _ _ / _| _ _ __ _
o | _/ \_, | | | | ' \ | _| | '_| / _` |
TS__[O] _|_|_ _|__/ |___| |_||_| _|_|_ _|_|_ \__,_|
{======|_| ``` |_| ````|_|`````|_|`````|_|`````|_|`````|_|`````|
./o--000' `-0-0-' `-0-0-' `-0-0-' `-0-0-' `-0-0-' `-0-0-' `-0-0-'
"""

View File

@ -58,7 +58,7 @@ def set_up_probing_webserver():
logger.warning(f"Got no metrics from analysis prometheus endpoint: {err}")
informed_about_missing_prometheus_endpoint = True
else:
raise err
logging.warning(f"Caught {err}")
return resp.text
return app