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
ac493847
authored
Jul 23, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added self.base.is_ready check
parent
5c0672bc
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 @
ac493847
...
...
@@ -320,6 +320,8 @@ class Disk(AclBase, TimeStampedModel):
if
self
.
is_ready
:
return
True
if
self
.
base
and
not
self
.
base
.
is_ready
:
raise
Exception
(
"Base image is not ready."
)
queue_name
=
self
.
get_remote_queue_name
(
'storage'
,
priority
=
"fast"
)
disk_desc
=
self
.
get_disk_desc
()
if
self
.
base
is
not
None
:
...
...
@@ -440,7 +442,7 @@ class Disk(AclBase, TimeStampedModel):
disk
=
Disk
.
create
(
datastore
=
self
.
datastore
,
base
=
new_base
,
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"
)
remote
=
storage_tasks
.
merge
.
apply_async
(
kwargs
=
{
...
...
@@ -457,4 +459,6 @@ class Disk(AclBase, TimeStampedModel):
AbortableAsyncResult
(
remote
.
id
)
.
abort
()
disk
.
destroy
()
raise
Exception
(
"Save as aborted by use."
)
disk
.
is_ready
=
True
disk
.
save
()
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