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
a49d8d21
Commit
a49d8d21
authored
Dec 03, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
86bce719
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
celery_stats_monitor.py
celery_stats/celery_stats_monitor.py
+6
-1
No files found.
celery_stats/celery_stats_monitor.py
View file @
a49d8d21
...
...
@@ -19,12 +19,16 @@ redis_old_mimas = redis.StrictRedis.from_url("redis://:ReDis!GmTx*0aN3@172.16.40
class
Parse_data
:
def
__init__
(
self
,
top
=
2000
,
consume
=
500
):
def
__init__
(
self
,
top
=
200
,
consume
=
500
):
self
.
top
=
top
self
.
consume
=
consume
self
.
offset_dict
=
{}
def
parse
(
self
,
key_name
,
len_data
,
per_sec
=
10
):
now
=
datetime
.
datetime
.
now
()
time_ts
=
now
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
if
len_data
<=
self
.
top
:
return
None
if
self
.
offset_dict
.
get
(
key_name
):
old_len_data
=
self
.
offset_dict
.
get
(
key_name
)
len_data_diff
=
old_len_data
-
len_data
...
...
@@ -54,6 +58,7 @@ if __name__ == "__main__":
rules
=
Parse_data
()
redis_clicnt_dct
=
{
"gaia-dbmw"
:
redis_old_gaia
,
"tapir-gaia-service"
:
redis_old_gaia
,
"mimas-dbmw"
:
redis_old_mimas
}
per_sec
=
10
...
...
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