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
f8eb994c
authored
Jul 30, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save is_ready on template saving
parent
e6afebb0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/storage/models.py
+5
-1
No files found.
circle/storage/models.py
View file @
f8eb994c
...
@@ -342,6 +342,8 @@ class Disk(TimeStampedModel):
...
@@ -342,6 +342,8 @@ class Disk(TimeStampedModel):
if
self
.
is_ready
:
if
self
.
is_ready
:
return
True
return
True
if
self
.
base
and
not
self
.
base
.
is_ready
:
raise
self
.
DiskIsNotReady
(
self
,
base
=
self
.
base
)
queue_name
=
self
.
get_remote_queue_name
(
'storage'
,
priority
=
"fast"
)
queue_name
=
self
.
get_remote_queue_name
(
'storage'
,
priority
=
"fast"
)
disk_desc
=
self
.
get_disk_desc
()
disk_desc
=
self
.
get_disk_desc
()
if
self
.
base
is
not
None
:
if
self
.
base
is
not
None
:
...
@@ -462,7 +464,7 @@ class Disk(TimeStampedModel):
...
@@ -462,7 +464,7 @@ class Disk(TimeStampedModel):
disk
=
Disk
.
create
(
datastore
=
self
.
datastore
,
disk
=
Disk
.
create
(
datastore
=
self
.
datastore
,
base
=
new_base
,
base
=
new_base
,
name
=
self
.
name
,
size
=
self
.
size
,
name
=
self
.
name
,
size
=
self
.
size
,
type
=
new_type
)
type
=
new_type
,
dev_num
=
self
.
dev_num
)
queue_name
=
self
.
get_remote_queue_name
(
"storage"
,
priority
=
"slow"
)
queue_name
=
self
.
get_remote_queue_name
(
"storage"
,
priority
=
"slow"
)
remote
=
storage_tasks
.
merge
.
apply_async
(
kwargs
=
{
remote
=
storage_tasks
.
merge
.
apply_async
(
kwargs
=
{
...
@@ -479,4 +481,6 @@ class Disk(TimeStampedModel):
...
@@ -479,4 +481,6 @@ class Disk(TimeStampedModel):
AbortableAsyncResult
(
remote
.
id
)
.
abort
()
AbortableAsyncResult
(
remote
.
id
)
.
abort
()
disk
.
destroy
()
disk
.
destroy
()
raise
Exception
(
"Save as aborted by use."
)
raise
Exception
(
"Save as aborted by use."
)
disk
.
is_ready
=
True
disk
.
save
()
return
disk
return
disk
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