Log exception details
This commit is contained in:
parent
8356c3bf95
commit
78fa06aa94
1 changed files with 6 additions and 1 deletions
|
@ -9,7 +9,6 @@ from django.core.mail import EmailMessage
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.utils import translation
|
from django.utils import translation
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from oca.pool import WrongIdError
|
|
||||||
|
|
||||||
from dynamicweb.celery import app
|
from dynamicweb.celery import app
|
||||||
from hosting.models import HostingOrder, HostingBill
|
from hosting.models import HostingOrder, HostingBill
|
||||||
|
@ -273,6 +272,12 @@ def delete_vm_task(self, user_id, vm_id):
|
||||||
if return_value is False:
|
if return_value is False:
|
||||||
raise Exception("Could not delete vm {}".format(vm_id))
|
raise Exception("Could not delete vm {}".format(vm_id))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.error(
|
||||||
|
"An exception occurred while deleting VM {vm_id}. Details "
|
||||||
|
"below".format(
|
||||||
|
vm_id=vm_id
|
||||||
|
)
|
||||||
|
)
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
try:
|
try:
|
||||||
retry_task(self)
|
retry_task(self)
|
||||||
|
|
Loading…
Reference in a new issue