Fix crashes
This commit is contained in:
parent
de834b16e5
commit
f3015ea2f0
9
main.py
9
main.py
@ -82,6 +82,7 @@ def check_email():
|
|||||||
logging.debug(r.status_code)
|
logging.debug(r.status_code)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
try:
|
||||||
while True:
|
while True:
|
||||||
logging.debug("Loop")
|
logging.debug("Loop")
|
||||||
check_email()
|
check_email()
|
||||||
@ -90,3 +91,11 @@ if __name__ == "__main__":
|
|||||||
logging.debug(r.status_code)
|
logging.debug(r.status_code)
|
||||||
|
|
||||||
time.sleep(CHECK_INTERVAL)
|
time.sleep(CHECK_INTERVAL)
|
||||||
|
except Exception as e:
|
||||||
|
try:
|
||||||
|
logging.error(f'Fehler: {e}')
|
||||||
|
|
||||||
|
r = requests.get(HEALTHCHECK_URL + "?status=down&msg=Unknown error&ping=")
|
||||||
|
logging.debug(r.status_code)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user