Skip to content

Commit cc12c88

Browse files
committed
fix dingding error
1 parent 2007428 commit cc12c88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/supervisor_healthCheck.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ def __init__(self, config):
161161

162162
self.mail_config = None
163163
self.wechat_config = None
164+
self.dingding_config = None
164165
self.supervisord_url = 'unix:///var/run/supervisor.sock'
165166

166167
if 'config' in config:
@@ -774,7 +775,7 @@ def action_dingding(self, program, action_type, msg, check_status):
774775

775776
host = "oapi.dingtalk.com"
776777
access_token = self.dingding_config.get('access_token')
777-
send_url = '/robot/send?access_token=={access_token}'.format(token=access_token)
778+
send_url = '/robot/send?access_token={access_token}'.format(access_token=access_token)
778779

779780
headers = {
780781
'Content-Type': 'application/json'
@@ -785,7 +786,7 @@ def action_dingding(self, program, action_type, msg, check_status):
785786
else:
786787
title = "[%s] Health check failed" % program
787788

788-
send_data = {"msgtype": "markdown",
789+
data = {"msgtype": "markdown",
789790
"markdown": {
790791
"title": title,
791792
"text": "#### 详情信息: \n> Program:%s \n\n> DataTime: %s \n\n> Hostname: %s \n\n> Platfrom: %s \n\n> Msg:%s" % (

0 commit comments

Comments
 (0)