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
15c8faf1
authored
Nov 29, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-shutdown-op' into 'master'
Fix shutdown op
✅
See merge request
!280
parents
38b6f781
62f9e566
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/vm/operations.py
+3
-2
No files found.
circle/vm/operations.py
View file @
15c8faf1
...
@@ -90,6 +90,7 @@ class AbortableRemoteOperationMixin(object):
...
@@ -90,6 +90,7 @@ class AbortableRemoteOperationMixin(object):
AbortableAsyncResult
(
remote
.
id
)
.
abort
()
AbortableAsyncResult
(
remote
.
id
)
.
abort
()
raise
humanize_exception
(
ugettext_noop
(
raise
humanize_exception
(
ugettext_noop
(
"Operation aborted by user."
),
e
)
"Operation aborted by user."
),
e
)
raise
TimeLimitExceeded
()
class
InstanceOperation
(
Operation
):
class
InstanceOperation
(
Operation
):
...
@@ -722,7 +723,7 @@ class SaveAsTemplateOperation(InstanceOperation):
...
@@ -722,7 +723,7 @@ class SaveAsTemplateOperation(InstanceOperation):
if
with_shutdown
:
if
with_shutdown
:
try
:
try
:
ShutdownOperation
(
self
.
instance
)
.
call
(
parent_activity
=
activity
,
self
.
instance
.
shutdown
(
parent_activity
=
activity
,
user
=
user
,
task
=
task
)
user
=
user
,
task
=
task
)
except
Instance
.
WrongStateError
:
except
Instance
.
WrongStateError
:
pass
pass
...
@@ -803,7 +804,7 @@ class ShutdownOperation(AbortableRemoteOperationMixin,
...
@@ -803,7 +804,7 @@ class ShutdownOperation(AbortableRemoteOperationMixin,
resultant_state
=
'STOPPED'
resultant_state
=
'STOPPED'
task
=
vm_tasks
.
shutdown
task
=
vm_tasks
.
shutdown
remote_queue
=
(
"vm"
,
"slow"
)
remote_queue
=
(
"vm"
,
"slow"
)
remote_timeout
=
1
2
0
remote_timeout
=
1
8
0
def
_operation
(
self
,
task
):
def
_operation
(
self
,
task
):
super
(
ShutdownOperation
,
self
)
.
_operation
(
task
=
task
)
super
(
ShutdownOperation
,
self
)
.
_operation
(
task
=
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