Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
circle/storage/tasks/local_tasks.py
+5
-7
No files found.
circle/storage/tasks/local_tasks.py
View file @
dd0e44ed
...
...
@@ -10,16 +10,14 @@ 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
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
def
save_as
(
disk
,
timeout
,
user
):
...
...
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