Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
85f1f63a
authored
Sep 27, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: fix deploy parameters
parent
ec9df20c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
circle/storage/models.py
+4
-3
circle/storage/tasks/local_tasks.py
+1
-3
No files found.
circle/storage/models.py
View file @
85f1f63a
...
...
@@ -124,7 +124,7 @@ class Disk(TimeStampedModel):
self
.
size
=
self
.
base
.
size
super
(
Disk
,
self
)
.
clean
(
*
args
,
**
kwargs
)
def
deploy
(
self
):
def
deploy
(
self
,
user
=
None
,
task_uuid
=
None
):
"""Reify the disk model on the associated data store.
:param self: the disk model to reify
...
...
@@ -159,10 +159,11 @@ class Disk(TimeStampedModel):
self
.
save
()
return
True
def
deploy_async
(
self
):
def
deploy_async
(
self
,
user
=
None
):
"""Execute deploy asynchronously.
"""
local_tasks
.
deploy
.
apply_async
(
self
)
local_tasks
.
deploy
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
def
delete
(
self
):
# TODO
...
...
circle/storage/tasks/local_tasks.py
View file @
85f1f63a
...
...
@@ -3,9 +3,7 @@ from manager.mancelery import celery
@celery.task
def
deploy
(
disk
,
user
):
'''Create new virtual machine from VM class.
'''
disk
.
deploy
(
task_uuid
=
deploy
.
rdiskd
,
user
=
user
)
disk
.
deploy
(
task_uuid
=
deploy
.
request
.
id
,
user
=
user
)
@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