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
59f2221c
authored
Jun 04, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: added priority parameter to remote_queue
parent
73c6938b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
circle/storage/models.py
+7
-4
No files found.
circle/storage/models.py
View file @
59f2221c
...
...
@@ -40,11 +40,12 @@ class DataStore(Model):
def
__unicode__
(
self
):
return
u'
%
s (
%
s)'
%
(
self
.
name
,
self
.
path
)
def
get_remote_queue_name
(
self
,
queue_id
,
check_worker
=
True
):
def
get_remote_queue_name
(
self
,
queue_id
,
priority
=
None
,
check_worker
=
True
):
logger
.
debug
(
"Checking for storage queue
%
s.
%
s"
,
self
.
hostname
,
queue_id
)
if
not
check_worker
or
local_tasks
.
check_queue
(
self
.
hostname
,
queue_id
):
queue_id
,
priority
):
return
self
.
hostname
+
'.'
+
queue_id
else
:
raise
WorkerNotFound
()
...
...
@@ -273,11 +274,13 @@ class Disk(AclBase, TimeStampedModel):
'type'
:
'snapshot'
if
self
.
base
else
'normal'
}
def
get_remote_queue_name
(
self
,
queue_id
=
'storage'
,
check_worker
=
True
):
def
get_remote_queue_name
(
self
,
queue_id
=
'storage'
,
priority
=
None
,
check_worker
=
True
):
"""Returns the proper queue name based on the datastore.
"""
if
self
.
datastore
:
return
self
.
datastore
.
get_remote_queue_name
(
queue_id
,
check_worker
)
return
self
.
datastore
.
get_remote_queue_name
(
queue_id
,
priority
,
check_worker
)
else
:
return
None
...
...
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