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
18d141d1
Commit
18d141d1
authored
Jul 01, 2021
by
宋柯
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4bdb6dc7
41cf44c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
.gitignore
.gitignore
+2
-0
celery_stats_monitor.py
celery_stats/celery_stats_monitor.py
+11
-7
No files found.
.gitignore
0 → 100644
View file @
18d141d1
.idea/
\ No newline at end of file
celery_stats/celery_stats_monitor.py
View file @
18d141d1
...
...
@@ -23,7 +23,9 @@ token_dict = {
'access_token'
:
"ca4ca402653c7fe6011c18ff5ac385b2b0f4ab6cab61c545f09f4d8830db6870"
},
"mentha-tapir-answer"
:
{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
"graces-tapir-card"
:
{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
"graces-tapir-card"
:
{
'secret'
:
"SECa54a42411200fd7c642921c35b7d0fe5a71c93e7305091413292bb6cc6cb318c"
,
'access_token'
:
"9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"
},
"graces-es6-tapir-lbs"
:
{
'secret'
:
"SECa54a42411200fd7c642921c35b7d0fe5a71c93e7305091413292bb6cc6cb318c"
,
'access_token'
:
"9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"
},
"mentha-tapir-tractate"
:
{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
...
...
@@ -71,12 +73,13 @@ def len_list_and_send_msg(redis_clint, key_name, rules, per_sec=10):
res
=
redis_clint
.
llen
(
key_name
)
# print(key_name,res)
str_res
=
rules
.
parse
(
key_name
,
res
,
per_sec
=
per_sec
)
if
str_res
and
key_name
!=
"graces-tapir-card"
:
send_msg_to_dingtalk
(
str_res
,
mobiles
=
[
"13552564745"
,
"17813268931"
],
secret
=
token_dict
[
key_name
][
'secret'
],
access_token
=
token_dict
[
key_name
][
'access_token'
])
elif
str_res
and
key_name
==
"graces-tapir-card"
:
send_msg_to_dingtalk
(
str_res
,
mobiles
=
[
"19566173658"
],
secret
=
token_dict
[
key_name
][
'secret'
],
access_token
=
token_dict
[
key_name
][
'access_token'
])
if
str_res
:
if
key_name
in
[
"graces-tapir-card"
,
"graces-es6-tapir-lbs"
]:
send_msg_to_dingtalk
(
str_res
,
mobiles
=
[
"19566173658"
],
secret
=
token_dict
[
key_name
][
'secret'
],
access_token
=
token_dict
[
key_name
][
'access_token'
])
else
:
send_msg_to_dingtalk
(
str_res
,
mobiles
=
[
"13552564745"
,
"17813268931"
],
secret
=
token_dict
[
key_name
][
'secret'
],
access_token
=
token_dict
[
key_name
][
'access_token'
])
if
__name__
==
"__main__"
:
...
...
@@ -91,6 +94,7 @@ if __name__ == "__main__":
"graces-es6-tapir-doctor"
:
redis_new_gaia
,
"mentha-tapir-answer"
:
redis_new_mimas
,
"graces-tapir-card"
:
redis_new_gaia
,
"graces-es6-tapir-lbs"
:
redis_new_gaia
,
"mentha-tapir-tractate"
:
redis_new_mimas
,
}
per_sec
=
60
*
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