We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 11e5dac + 64bd20d commit 4bc3c2eCopy full SHA for 4bc3c2e
1 file changed
flaskAlert.py
@@ -44,8 +44,20 @@ def postAlertmanager():
44
message += "Started: "+correctDate
45
bot.sendMessage(chat_id=chatID, text=message)
46
return "Alert OK", 200
47
+ except RetryAfter:
48
+ sleep(30)
49
+ bot.sendMessage(chat_id=chatID, text=message)
50
+ return "Alert OK", 200
51
+ except TimedOut as e:
52
+ sleep(60)
53
54
55
+ except NetworkError as e:
56
57
58
59
except Exception as error:
- bot.sendMessage(chat_id=chatID, text="Error to read json: "+str(error))
60
+ bot.sendMessage(chat_id=chatID, text="Error: "+str(error))
61
app.logger.info("\t%s",error)
62
return "Alert fail", 200
63
0 commit comments