Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dd0e44ed
authored
Apr 17, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: refactor check_queue task
parent
9e5265b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
circle/storage/tasks/local_tasks.py
+6
-8
No files found.
circle/storage/tasks/local_tasks.py
View file @
dd0e44ed
...
...
@@ -10,15 +10,13 @@ def check_queue(storage, queue_id):
drivers
=
[
'storage'
,
'download'
]
worker_list
=
[
storage
+
"."
+
d
for
d
in
drivers
]
queue_name
=
storage
+
"."
+
queue_id
# v is List of List of queues dict
active_queues
=
celery
.
control
.
inspect
(
worker_list
)
.
active_queues
()
if
active_queues
is
not
None
:
node_workers
=
[
v
for
k
,
v
in
active_queues
.
iteritems
()]
for
worker
in
node_workers
:
for
queue
in
worker
:
if
queue
[
'name'
]
==
queue_name
:
return
True
return
False
if
active_queues
is
None
:
return
False
queue_names
=
(
queue
[
'name'
]
for
worker
in
active_queues
.
itervalues
()
for
queue
in
worker
)
return
queue_name
in
queue_names
@celery.task
...
...
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