Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wsmonitor_sql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋鹏博
wsmonitor_sql
Commits
171e350b
Commit
171e350b
authored
Mar 20, 2025
by
宋鹏博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://begitlab.chubanyun.me:12122/songpengbo/wsmonitor_sql
into test
Conflicts: common/cutils.py config.py
parents
10f31ab2
bd28e37e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
23 deletions
+18
-23
cutils.py
common/cutils.py
+5
-6
config.py
config.py
+13
-17
No files found.
common/cutils.py
View file @
171e350b
...
...
@@ -35,11 +35,11 @@ def error_message(text, url=wechaturl, mobile_list=16638842134):
# 发送mkdown格式微信消息
def
mk_error_message
(
error_editor
,
error_answer
,
message_id
,
url
=
wechaturl
):
data
=
{
"msgtype"
:
"markdown"
,
"markdown"
:
{
"content"
:
f
"ws推送<font color=
\"
warning
\"
>异常</font>,请相关同事注意。
\n
>问题编辑:<font color=
\"
comment
\"
>{error_editor}</font>
\n
>消息id:<font color=
\"
comment
\"
>{message_id}</font>
\n
>返回消息:<font color=
\"
comment
\"
>{error_answer}</font> "
"msgtype"
:
"markdown"
,
"markdown"
:
{
"content"
:
f
"ws推送<font color=
\"
warning
\"
>异常</font>,请相关同事注意。
\n
>问题编辑:<font color=
\"
comment
\"
>{error_editor}</font>
\n
>消息id:<font color=
\"
comment
\"
>{message_id}</font>
\n
>返回消息:<font color=
\"
comment
\"
>{error_answer}</font> "
}
}
}
requests
.
post
(
url
,
json
=
data
)
...
...
@@ -66,5 +66,4 @@ if __name__ == '__main__':
if
"true"
or
"false"
in
data
[
0
][
1
]:
dirt
=
data
[
0
][
1
]
.
replace
(
"true"
,
"True"
)
.
replace
(
"false"
,
"False"
)
d
=
ast
.
literal_eval
(
dirt
)
print
(
d
.
get
(
"msgContentList"
)[
1
]
.
get
(
"data"
))
print
(
d
.
get
(
"msgContentList"
)[
1
]
.
get
(
"data"
)
.
get
(
"reviewReportRecordId"
))
config.py
View file @
171e350b
import
os
# 测试环境数据库
host
=
"122.112.227.235"
user
=
"userop"
database_pwd
=
"0#ztXqUzECGen8E"
database
=
"aireview"
port
=
3306
#
host = "122.112.227.235"
#
user = "userop"
#
database_pwd = "0#ztXqUzECGen8E"
#
database = "aireview"
#
port = 3306
# 生产环境aireview数据库
# host = "192.168.8.234"
# user = "aireview110"
...
...
@@ -13,21 +11,18 @@ port = 3306
# database = "aireview"
# port = 3306
# 生产环境aicaption数据库
#
host = "192.168.8.234"
#
user = "aicaptain110"
#
database_pwd = "ABs4B79c"
#
database = "aicaptain"
#
port = 3306
host
=
"192.168.8.234"
user
=
"aicaptain110"
database_pwd
=
"ABs4B79c"
database
=
"aicaptain"
port
=
3306
# 微信机器人url
wechaturl
=
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5a4fa3ba-9974-44d3-9c1e-2428f77f8087"
# 问题词
error_answer
=
[
"无法回答此类问题,请换个话题吧"
,
"二维码创建失败"
,
"意图下发失败"
,
"文件处理失败"
,
"生成失败"
,
"润色任务失败"
,
"网络异常"
,
"获取书评助理结果失败"
,
"审校失败"
,
"图书生成报告失败"
,
"对不起,我暂时无法回答这个问题"
]
error_answer
=
[
"无法回答此类问题,请换个话题吧"
,
"二维码创建失败"
,
"意图下发失败"
,
"文件处理失败"
,
"生成失败"
,
"润色任务失败"
,
"网络异常"
,
"获取书评助理结果失败"
,
"审校失败"
,
"图书生成报告失败"
,
"对不起,我暂时无法回答这个问题"
]
# 文件路径设置
file_path
=
os
.
path
.
dirname
(
__file__
)
file_path
=
os
.
path
.
dirname
(
__file__
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment