Merge branch 'master' into task/3772/hosting_billing_monthly_subscription
This commit is contained in:
commit
7256160a7b
3 changed files with 26 additions and 8 deletions
|
|
@ -2,6 +2,7 @@ from datetime import datetime
|
|||
|
||||
from celery.exceptions import MaxRetriesExceededError
|
||||
from celery.utils.log import get_task_logger
|
||||
from celery import current_task
|
||||
from django.conf import settings
|
||||
from django.core.mail import EmailMessage
|
||||
|
||||
|
|
@ -48,6 +49,7 @@ def create_vm_task(self, vm_template_id, user, specs, template,
|
|||
stripe_customer_id, billing_address_data,
|
||||
billing_address_id,
|
||||
charge, cc_details):
|
||||
logger.debug("Running create_vm_task on {}".format(current_task.request.hostname))
|
||||
vm_id = None
|
||||
try:
|
||||
final_price = specs.get('price')
|
||||
|
|
@ -169,8 +171,8 @@ def create_vm_task(self, vm_template_id, user, specs, template,
|
|||
email_data = {
|
||||
'subject': '{} CELERY TASK ERROR: {}'.format(settings.DCL_TEXT,
|
||||
msg_text),
|
||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||
'to': ['info@ungleich.ch'],
|
||||
'from_email': current_task.request.hostname,
|
||||
'to': settings.DCL_ERROR_EMAILS_TO_LIST,
|
||||
'body': ',\n'.join(str(i) for i in self.request.args)
|
||||
}
|
||||
email = EmailMessage(**email_data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue