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
5acd2212
Commit
5acd2212
authored
Nov 17, 2021
by
宋柯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监控新的美购同步队列
parent
de343fce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
celery_stats_monitor.py
celery_stats/celery_stats_monitor.py
+1
-12
No files found.
celery_stats/celery_stats_monitor.py
View file @
5acd2212
...
...
@@ -33,8 +33,6 @@ token_dict = {
'access_token'
:
"9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"
},
"graces-es6-tapir-lbs"
:
{
'secret'
:
"SECa54a42411200fd7c642921c35b7d0fe5a71c93e7305091413292bb6cc6cb318c"
,
'access_token'
:
"9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"
},
"graces-es6-tapir-merchant"
:
{
'secret'
:
"SECa54a42411200fd7c642921c35b7d0fe5a71c93e7305091413292bb6cc6cb318c"
,
'access_token'
:
"9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"
},
"mentha-tapir-tractate"
:
{
'secret'
:
"SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c"
,
'access_token'
:
"df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"
},
}
...
...
@@ -111,22 +109,13 @@ if __name__ == "__main__":
"graces-es6-tapir-merchant"
:
redis_new_gaia
,
}
per_sec
=
60
per_sec
=
60
*
5
thirty_per_sec
=
60
*
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
num
==
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
)
len_list_and_send_msg
(
thirty_redis_clicnt_dct
[
redis_clint_key
],
redis_clint_key
,
rules
,
per_sec
)
last_time
=
now
num
=
0
time
.
sleep
(
1
)
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