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
fd49ea7e
authored
Feb 09, 2014
by
Guba Sándor
Committed by
Őry Máté
Feb 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix TimeLimitExceeded exception's name
parent
07fb9e65
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
circle/vm/models/instance.py
+6
-3
No files found.
circle/vm/models/instance.py
View file @
fd49ea7e
...
...
@@ -15,7 +15,7 @@ from django.dispatch import Signal
from
django.utils
import
timezone
from
django.utils.translation
import
ugettext_lazy
as
_
from
celery.exceptions
import
Time
outError
from
celery.exceptions
import
Time
LimitExceeded
from
model_utils.models
import
TimeStampedModel
from
taggit.managers
import
TaggableManager
...
...
@@ -775,7 +775,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
raise
self
.
WrongStateError
(
self
)
def
__on_abort
(
activity
,
error
):
if
isinstance
(
error
,
Time
outError
):
if
isinstance
(
error
,
Time
LimitExceeded
):
activity
.
resultant_state
=
None
else
:
activity
.
resultant_state
=
'ERROR'
...
...
@@ -826,7 +826,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
"""Shutdown virtual machine with ACPI signal.
"""
def
__on_abort
(
activity
,
error
):
if
isinstance
(
error
,
Time
outError
):
if
isinstance
(
error
,
Time
LimitExceeded
):
activity
.
resultant_state
=
None
else
:
activity
.
resultant_state
=
'ERROR'
...
...
@@ -841,6 +841,9 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
queue_name
=
self
.
get_remote_queue_name
(
'vm'
)
vm_tasks
.
shutdown
.
apply_async
(
args
=
[
self
.
vm_name
],
queue
=
queue_name
)
.
get
()
self
.
node
=
None
self
.
vnc_port
=
None
self
.
save
()
def
shutdown_async
(
self
,
user
=
None
):
"""Execute shutdown asynchronously.
...
...
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