Fix crashes
This commit is contained in:
parent
de834b16e5
commit
f3015ea2f0
21
main.py
21
main.py
@ -82,11 +82,20 @@ def check_email():
|
||||
logging.debug(r.status_code)
|
||||
|
||||
if __name__ == "__main__":
|
||||
while True:
|
||||
logging.debug("Loop")
|
||||
check_email()
|
||||
try:
|
||||
while True:
|
||||
logging.debug("Loop")
|
||||
check_email()
|
||||
|
||||
r = requests.get(HEALTHCHECK_URL + "?status=up&msg=OK&ping=")
|
||||
logging.debug(r.status_code)
|
||||
r = requests.get(HEALTHCHECK_URL + "?status=up&msg=OK&ping=")
|
||||
logging.debug(r.status_code)
|
||||
|
||||
time.sleep(CHECK_INTERVAL)
|
||||
except Exception as e:
|
||||
try:
|
||||
logging.error(f'Fehler: {e}')
|
||||
|
||||
time.sleep(CHECK_INTERVAL)
|
||||
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