Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
celery_len_monitor
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
system
celery_len_monitor
Commits
28b4574d
Commit
28b4574d
authored
Nov 10, 2017
by
hukx.michael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get queue error
parent
c636db5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
main.py
main.py
+2
-2
No files found.
main.py
View file @
28b4574d
...
@@ -15,7 +15,7 @@ class Monitor(object):
...
@@ -15,7 +15,7 @@ class Monitor(object):
self
.
rs
=
{
redis_url
:
redis
.
StrictRedis
(
*
redis_url
.
split
(
':'
))
for
redis_url
in
settings
.
REDIS_URL
}
self
.
rs
=
{
redis_url
:
redis
.
StrictRedis
(
*
redis_url
.
split
(
':'
))
for
redis_url
in
settings
.
REDIS_URL
}
self
.
keyprefix_queue
=
'_kombu.binding.'
self
.
keyprefix_queue
=
'_kombu.binding.'
self
.
sep
=
'
\x06\x16
'
self
.
sep
=
'
\x06\x16
'
self
.
redis_queue_map
=
{}
self
.
redis_queue_map
=
{
redis_url
:
[]
for
redis_url
in
settings
.
REDIS_URL
}
def
refresh_redis_queue_map
(
self
):
def
refresh_redis_queue_map
(
self
):
for
url
,
r
in
self
.
rs
.
items
():
for
url
,
r
in
self
.
rs
.
items
():
...
@@ -23,7 +23,7 @@ class Monitor(object):
...
@@ -23,7 +23,7 @@ class Monitor(object):
and
not
x
.
endswith
(
'pidbox'
),
and
not
x
.
endswith
(
'pidbox'
),
r
.
keys
(
'
%
s*'
%
self
.
keyprefix_queue
))
r
.
keys
(
'
%
s*'
%
self
.
keyprefix_queue
))
for
exchange
in
exchanges
:
for
exchange
in
exchanges
:
self
.
redis_queue_map
[
url
]
=
[
queue_str
.
split
(
self
.
sep
)[
-
1
]
for
queue_str
in
r
.
smembers
(
exchange
)]
self
.
redis_queue_map
[
url
]
+
=
[
queue_str
.
split
(
self
.
sep
)[
-
1
]
for
queue_str
in
r
.
smembers
(
exchange
)]
def
get_jam_tasks_nums
(
self
):
def
get_jam_tasks_nums
(
self
):
"""
"""
...
...
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