Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
E
evsuits
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
OpsTeam
evsuits
Commits
3c16139a
提交
3c16139a
authored
6月 08, 2020
作者:
blu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
filter
上级
64380986
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
5 行增加
和
0 行删除
+5
-0
.DS_Store
opencv-motion-detect/.DS_Store
+0
-0
notify.py
opencv-motion-detect/dingbot/notify.py
+5
-0
没有找到文件。
opencv-motion-detect/.DS_Store
浏览文件 @
3c16139a
No preview for this file type
opencv-motion-detect/dingbot/notify.py
浏览文件 @
3c16139a
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论