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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
51461497
authored
Jun 04, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm_task: add priority parameter for check queues
parent
8aaa4d14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
circle/vm/tasks/vm_tasks.py
+5
-2
No files found.
circle/vm/tasks/vm_tasks.py
View file @
51461497
...
...
@@ -6,16 +6,19 @@ from manager.mancelery import celery
logger
=
getLogger
(
__name__
)
def
check_queue
(
node_hostname
,
queue_id
):
def
check_queue
(
node_hostname
,
queue_id
,
priority
=
None
):
"""True if the queue is alive.
Example: check_queue('node01', 'vm'):
Example: check_queue('node01', 'vm'
, 'slow'
):
:param node_hostname: Short hostname of the node.
:param queue_id: Queue identifier (eg. vm).
:param priority: can be 'slow', 'fast' or None
"""
# drivers = ['vmdriver', 'netdriver', 'agentdriver']
# worker_list = [node_hostname + "." + d for d in drivers]
queue_name
=
node_hostname
+
"."
+
queue_id
if
priority
is
not
None
:
queue_name
=
queue_name
+
"."
+
priority
active_queues
=
get_queues
()
if
active_queues
is
None
:
return
False
...
...
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