We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7083f32 commit e90a940Copy full SHA for e90a940
otsserver/backup.py
@@ -249,11 +249,13 @@ def loop(self):
249
try:
250
r = requests.get(backup_url)
251
except Exception as err:
252
- logging.error("Exception asking " + str(backup_url) + " message " + str(err))
253
- break
+ logging.error("Exception asking %s error message %s, sleeping for %d seconds"
+ % (str(backup_url), str(err), SLEEP_SECS))
254
+ time.sleep(SLEEP_SECS)
255
+ continue
256
257
if r.status_code != 200:
- logging.info("%s not found, sleeping for %s seconds" % (backup_url, SLEEP_SECS) )
258
+ logging.info("%s not found, sleeping for %d seconds" % (backup_url, SLEEP_SECS))
259
time.sleep(SLEEP_SECS)
260
continue
261
0 commit comments