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
6c738666
authored
Sep 12, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: add return value for deploy
parent
2b355902
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
circle/storage/models.py
+11
-1
No files found.
circle/storage/models.py
View file @
6c738666
...
@@ -102,8 +102,17 @@ class Disk(TimeStampedModel):
...
@@ -102,8 +102,17 @@ class Disk(TimeStampedModel):
manager
.
storage
.
deploy
.
apply_async
(
self
)
manager
.
storage
.
deploy
.
apply_async
(
self
)
def
deploy
(
self
):
def
deploy
(
self
):
"""Reify the disk model on the associated data store.
:param self: the disk model to reify
:type self: storage.models.Disk
:return: True if a new reification of the disk has been created;
otherwise, False.
:rtype: bool
"""
if
self
.
ready
:
if
self
.
ready
:
return
return
False
disk_desc
=
{
disk_desc
=
{
'name'
:
self
.
name
,
'name'
:
self
.
name
,
...
@@ -116,6 +125,7 @@ class Disk(TimeStampedModel):
...
@@ -116,6 +125,7 @@ class Disk(TimeStampedModel):
tasks
.
create_disk
.
delay
(
disk_desc
)
.
get
()
tasks
.
create_disk
.
delay
(
disk_desc
)
.
get
()
self
.
ready
=
True
self
.
ready
=
True
self
.
save
()
self
.
save
()
return
True
@classmethod
@classmethod
def
delete_signal
(
cls
,
sender
,
instance
,
using
,
**
kwargs
):
def
delete_signal
(
cls
,
sender
,
instance
,
using
,
**
kwargs
):
...
...
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