Skip to content

Commit 61e9506

Browse files
Rohit KumarRohit Kumar
authored andcommitted
Fixed slack alert issue
1 parent 14c16bf commit 61e9506

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def SlackAlert(msg):
2525
"""
2626
if VERBOSE == "enabled":
2727
msg = msg + " [" + time.strftime("%Y-%m-%d %H:%M:%S") + "]"
28-
requests.post(config['SLACK_WEBHOOK'], data={"text": msg})
28+
requests.post(config['SLACK_WEBHOOK'], json={"text": msg})
2929

3030
@app.route("/webhook", methods=['POST'])
3131
def webhook():
@@ -46,4 +46,5 @@ def webhook():
4646

4747

4848
if __name__ == "__main__":
49+
SlackAlert("🚀 Starting the webhook server.")
4950
app.run(host='0.0.0.0', port=5000)

0 commit comments

Comments
 (0)