|
@@ -75,13 +75,12 @@ while True:
|
|
|
# 关闭数据库
|
|
|
mysql_cur.close()
|
|
|
conn.close()
|
|
|
- #
|
|
|
- # if messages:
|
|
|
- # print("%s 发送钉钉报警" % datetime_now())
|
|
|
- # messages.append("<font color=#0080FF>详情查看MySQL数据库sagacloud_setup里的space_meet_set表</font>")
|
|
|
- # messages_info = "\n".join(messages)
|
|
|
- # # 如果有报警,发送钉钉
|
|
|
- # title = "## **【四川大厦】会议室未绑定空间报警** "
|
|
|
- # messages_info = title + "\n" + "___" + "\n" + messages_info
|
|
|
- # send_message_markdown(title, messages_info, dingding)
|
|
|
+ if messages:
|
|
|
+ print("%s 发送钉钉报警" % datetime_now())
|
|
|
+ messages.append("<font color=#0080FF>详情查看MySQL数据库sagacloud_setup里的space_meet_set表</font>")
|
|
|
+ messages_info = "\n".join(messages)
|
|
|
+ # 如果有报警,发送钉钉
|
|
|
+ title = "## **【四川大厦】会议室未绑定空间报警** "
|
|
|
+ messages_info = title + "\n" + "___" + "\n" + messages_info
|
|
|
+ send_message_markdown(title, messages_info, dingding)
|
|
|
time.sleep(2)
|