提交 3c16139a authored 作者: blu's avatar blu

filter

上级 64380986
......@@ -127,6 +127,8 @@ class DingBot:
report = False
if jd.get('category') == 'issues' and jd.get('data'):
for k, v in jd["data"].items():
if k != "AV_MGROFFLINE" and k != "AV_OPENINPUT" and k != "AV_LOOPRESTART": # ignore other reports
continue
if not ipcSn:
ipcSn = v["ipc"]
if ipcSn in DingBot.event_backlogs:
......@@ -153,6 +155,8 @@ class DingBot:
elif k == 'AV_OPENINPUT':
pos = msg.rfind(":")
issues += "[{}]连接失败: {}".format(idx, msg[pos+2:])
elif k == "AV_LOOPRESTART":
issues += "[{}] 模块频繁重启".format(idx)
else:
issues += "[{}] {}".format(idx, msg)
idx+=1
......@@ -178,6 +182,7 @@ class DingBot:
self.client.on_message = DingBot.on_message
self.client.connect_async(self.host, self.port, 30)
self.client.loop_start()
self.send_msg('提示', "小E我更新重启了, 并将重新分析所有异常", "http://evcloudsvc.ilabservice.cloud:8089/issues")
except Exception as e:
logger.error('exception in init:', e)
# extype, value, tb = sys.exc_info()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论