Fix hostname issue on machines without ".local" in hostname and handle missed TimeOut exception

This commit is contained in:
Brett Williams
2023-06-10 16:07:58 -05:00
parent 38936d40ab
commit 2763a0c97f
2 changed files with 6 additions and 2 deletions

View File

@@ -64,8 +64,11 @@ class RenderServerProxy:
return req.json()
except json.JSONDecodeError as e:
logger.debug(f"JSON decode error: {e}")
except requests.ReadTimeout as e:
logger.warning(f"Timed out: {e}")
self.__offline_flags = self.__offline_flags + 1
except requests.ConnectionError as e:
logger.error(f"Connection error: {e}")
logger.warning(f"Connection error: {e}")
self.__offline_flags = self.__offline_flags + 1
except Exception as e:
logger.exception(f"Uncaught exception: {e}")