Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
Project
Project
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
黎涛
meta_base_code
Commits
58871406
Commit
58871406
authored
Dec 03, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3a46498f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
celery_stats_monitor.py
celery_stats/celery_stats_monitor.py
+6
-3
No files found.
celery_stats/celery_stats_monitor.py
View file @
58871406
...
@@ -7,8 +7,11 @@
...
@@ -7,8 +7,11 @@
import
redis
import
redis
from
send_msg_to_dingding.send_msg
import
send_msg_to_dingtalk
from
send_msg_to_dingding.send_msg
import
send_msg_to_dingtalk
import
datetime
,
time
import
datetime
,
time
secret
=
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
token_dict
=
{
access_token
=
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
'gaia-dbmw'
:{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
'tapir-gaia-service'
:{
'secret'
:
"SEC65d8ac5f9c92677cf0c98624810abc407cf433fd4f2713649dc41310b4658fb5"
,
'access_token'
:
"ca4ca402653c7fe6011c18ff5ac385b2b0f4ab6cab61c545f09f4d8830db6870"
},
'mimas-dbmw'
:{
'secret'
:
"SEC65d8ac5f9c92677cf0c98624810abc407cf433fd4f2713649dc41310b4658fb5"
,
'access_token'
:
"ca4ca402653c7fe6011c18ff5ac385b2b0f4ab6cab61c545f09f4d8830db6870"
},
}
# send_msg_to_dingtalk("123",secret=secret,access_token=access_token)
# send_msg_to_dingtalk("123",secret=secret,access_token=access_token)
...
@@ -53,7 +56,7 @@ def len_list_and_send_msg(redis_clint,key_name,rules,per_sec=10):
...
@@ -53,7 +56,7 @@ def len_list_and_send_msg(redis_clint,key_name,rules,per_sec=10):
# print(key_name,res)
# print(key_name,res)
str_res
=
rules
.
parse
(
key_name
,
res
,
per_sec
=
per_sec
)
str_res
=
rules
.
parse
(
key_name
,
res
,
per_sec
=
per_sec
)
if
str_res
:
if
str_res
:
send_msg_to_dingtalk
(
str_res
,
secret
=
secret
,
access_token
=
access_token
)
send_msg_to_dingtalk
(
str_res
,
secret
=
token_dict
[
key_name
][
'secret'
],
access_token
=
token_dict
[
key_name
][
'access_token'
]
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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