Skip to content
Snippets Groups Projects
Commit 456ea025 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Return to default color after server has been reached again

parent ab2f4d4d
Branches
No related tags found
No related merge requests found
......@@ -200,6 +200,7 @@ def process_request(output_queue, config=None, logger=None):
# Display the fitting LED color for the state at the given repetition
while not reached:
dispatch_led("error", config)
time.sleep(6)
try:
r = requests.get(url, timeout=config["server"]["timeout"])
if r.ok:
......@@ -211,7 +212,6 @@ def process_request(output_queue, config=None, logger=None):
if logger is not None:
logger.warning("Didn't reach server at {} for {} attempts: ".format(url, attempts, e))
attempts += 1
time.sleep(6)
logger.warn("Reached server again after {} attempts ".format(attempts))
dispatch_led("default", config)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment