Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
66c1cfd4
authored
Feb 19, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm_task: return False when no workers found fixes #79
parent
cd43c8bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
circle/vm/tasks/vm_tasks.py
+4
-1
No files found.
circle/vm/tasks/vm_tasks.py
View file @
66c1cfd4
...
@@ -6,8 +6,11 @@ def check_queue(node_hostname, queue_id):
...
@@ -6,8 +6,11 @@ def check_queue(node_hostname, queue_id):
worker_list
=
[
node_hostname
+
"."
+
d
for
d
in
drivers
]
worker_list
=
[
node_hostname
+
"."
+
d
for
d
in
drivers
]
queue_name
=
node_hostname
+
"."
+
queue_id
queue_name
=
node_hostname
+
"."
+
queue_id
inspect
=
celery
.
control
.
inspect
(
worker_list
)
inspect
=
celery
.
control
.
inspect
(
worker_list
)
active_queues
=
inspect
.
active_queues
()
if
active_queues
is
None
:
return
False
# v is List of List of queues dict
# v is List of List of queues dict
node_workers
=
[
v
for
k
,
v
in
inspect
.
active_queues
()
.
iteritems
()]
node_workers
=
[
v
for
k
,
v
in
active_queues
.
iteritems
()]
for
worker
in
node_workers
:
for
worker
in
node_workers
:
for
queue
in
worker
:
for
queue
in
worker
:
if
queue
[
'name'
]
==
queue_name
:
if
queue
[
'name'
]
==
queue_name
:
...
...
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