More bug fixes
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
c59366776b
commit
dafcfc6464
1 changed files with 4 additions and 3 deletions
|
@ -129,7 +129,7 @@ def api_send_status(name, status, api, token):
|
||||||
else:
|
else:
|
||||||
print("Warning: Unable to send status '" + status + "' for tile '" + name + "'. Trying again in 60 seconds")
|
print("Warning: Unable to send status '" + status + "' for tile '" + name + "'. Trying again in 60 seconds")
|
||||||
sleep(60)
|
sleep(60)
|
||||||
except ConnectionError:
|
except (ConnectionError, ProtocolError, OSError, IOError):
|
||||||
print("Warning: Unable to send status " + status + " for tile " + name + ". Trying again in 60 seconds")
|
print("Warning: Unable to send status " + status + " for tile " + name + ". Trying again in 60 seconds")
|
||||||
sleep(60)
|
sleep(60)
|
||||||
|
|
||||||
|
@ -179,7 +179,8 @@ def api_get_job(action, api, token, none_exit=True):
|
||||||
print("Unable to get job. Retrying in 60 seconds...")
|
print("Unable to get job. Retrying in 60 seconds...")
|
||||||
sleep(60)
|
sleep(60)
|
||||||
ret = api_get_job(action, api, token, none_exit)
|
ret = api_get_job(action, api, token, none_exit)
|
||||||
except ConnectionError:
|
return ret
|
||||||
|
except (ConnectionError, ProtocolError, OSError, IOError):
|
||||||
print("Unable to get job. Retrying in 60 seconds...")
|
print("Unable to get job. Retrying in 60 seconds...")
|
||||||
sleep(60)
|
sleep(60)
|
||||||
ret = api_get_job(action, api, token, none_exit)
|
ret = api_get_job(action, api, token, none_exit)
|
||||||
|
@ -222,6 +223,6 @@ def api_get_status(name, api, api_token):
|
||||||
else:
|
else:
|
||||||
print("ERROR: Unable to get status.")
|
print("ERROR: Unable to get status.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except ConnectionError:
|
except (ConnectionError, ProtocolError, OSError, IOError):
|
||||||
print("ERROR: Unable to get status.")
|
print("ERROR: Unable to get status.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in a new issue