Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
83c9efd5
authored
May 14, 2024
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
切换微信告警机器人
parent
e1694208
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
utils/robots.py
utils/robots.py
View file @
83c9efd5
...
...
@@ -6,16 +6,17 @@ import requests
dd_robot_api
=
' https://oapi.dingtalk.com/robot/send?access_token='
tom
=
'c19beeab837f5c6e019e7fc602d470704d634ae33510f40fb0e903cde215fb24'
wechat_robot_api
=
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key="
tom_key
=
"bb2b5b4e-9a06-4d3d-89f5-61bcf07ed4ba"
def
dd_send_msg
(
msg
,
robot
=
tom
):
def
dd_send_msg
(
msg
,
robot
=
tom_key
):
data
=
{
"msgtype"
:
"text"
,
"text"
:
{
"content"
:
msg
}
}
requests
.
post
(
dd
_robot_api
+
robot
,
json
=
data
)
requests
.
post
(
wechat
_robot_api
+
robot
,
json
=
data
)
time
.
sleep
(
5
)
...
...
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