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
a68453a0
Commit
a68453a0
authored
Sep 29, 2021
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改某些队列的报警时间
parent
6fc739b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
celery_stats_monitor.py
celery_stats/celery_stats_monitor.py
+8
-5
__init__.cpython-36.pyc
send_msg_to_dingding/__pycache__/__init__.cpython-36.pyc
+0
-0
send_msg.cpython-36.pyc
send_msg_to_dingding/__pycache__/send_msg.cpython-36.pyc
+0
-0
No files found.
celery_stats/celery_stats_monitor.py
View file @
a68453a0
...
...
@@ -18,7 +18,7 @@ token_dict = {
"graces-es6-tapir-diary"
:
{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
"graces-es6-tapir-message"
:
{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
"graces-es6-tapir-service"
:
{
'secret'
:
"SEC65d8ac5f9c92677cf0c98624810abc407cf433fd4f2713649dc41310b4658fb5"
,
'access_token'
:
"ca4ca402653c7fe6011c18ff5ac385b2b0f4ab6cab61c545f09f4d8830db6870"
},
"graces-es6-tapir-service_pre"
:
{
'secret'
:
"SEC65d8ac5f9c92677cf0c98624810abc407cf433fd4f2713649dc41310b4658fb5"
,
...
...
@@ -39,7 +39,7 @@ token_dict = {
# send_msg_to_dingtalk("123",secret=secret,access_token=access_token)
#
redis_old_gaia
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN11@172.16.40.166:6379/9"
,
decode_responses
=
True
)
redis_old_mimas
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN3@172.16.40.145:6379/5"
,
decode_responses
=
True
)
redis_new_gaia
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN19@172.16.50.166:6379"
,
decode_responses
=
True
)
...
...
@@ -108,19 +108,22 @@ if __name__ == "__main__":
"graces-es6-tapir-lbs"
:
redis_new_gaia
,
"graces-es6-tapir-merchant"
:
redis_new_gaia
,
}
per_sec
=
60
*
5
thirty_per_sec
=
60
*
30
per_sec
=
5
thirty_per_sec
=
30
last_time
=
time
.
time
()
num
=
0
while
True
:
now
=
time
.
time
()
if
now
-
last_time
>=
per_sec
:
for
redis_clint_key
in
redis_clicnt_dct
:
len_list_and_send_msg
(
redis_clicnt_dct
[
redis_clint_key
],
redis_clint_key
,
rules
,
per_sec
)
last_time
=
now
num
+=
1
if
n
ow
-
last_time
>=
thirty_per_sec
:
if
n
um
==
6
:
for
redis_clint_key
in
thirty_redis_clicnt_dct
:
len_list_and_send_msg
(
thirty_redis_clicnt_dct
[
redis_clint_key
],
redis_clint_key
,
rules
,
thirty_per_sec
)
last_time
=
now
num
=
0
time
.
sleep
(
1
)
send_msg_to_dingding/__pycache__/__init__.cpython-36.pyc
0 → 100644
View file @
a68453a0
File added
send_msg_to_dingding/__pycache__/send_msg.cpython-36.pyc
0 → 100644
View file @
a68453a0
File added
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