Skip to content

Commit 75ef5bf

Browse files
author
杨红飞
committed
[Update]更新依赖、匹配不到规则发默认发送人
1 parent 5338f41 commit 75ef5bf

File tree

13 files changed

+12
-11
lines changed

13 files changed

+12
-11
lines changed
1.78 KB
Binary file not shown.
119 Bytes
Binary file not shown.
900 Bytes
Binary file not shown.
2.05 KB
Binary file not shown.
128 Bytes
Binary file not shown.
5.11 KB
Binary file not shown.

biz/handlers/send_handler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ def post(self, *args, **kwargs):
124124
mail_ssl=True if config_info.get(const.EMAIL_USE_SSL) == '1' else False)
125125
### 如果没有redis没有配置
126126
if not emails_list:
127-
sm.send_mail(configs.get('default_email'), alert_name, alerts_data['annotations']['detail'])
127+
# print(configs.get('default_email'))[0] #元祖类型
128+
sm.send_mail(configs.get('default_email')[0], alert_name, alerts_data['annotations']['detail'])
129+
# print('msg=',alerts_data['annotations']['detail'])
128130
return self.write(dict(code=-1, msg="没有匹配到规则"))
129131

130132
### 默认发送邮件
120 Bytes
Binary file not shown.
1.18 KB
Binary file not shown.
122 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)