Commit f0b9a114 authored by ibuler's avatar ibuler

[Update] ansible disk bug

parent f6d21585
......@@ -19,7 +19,7 @@ FORKS = 10
TIMEOUT = 60
logger = get_logger(__file__)
CACHE_MAX_TIME = 60*60*60
disk_pattern = re.compile(r'^hd|sd|xvd')
disk_pattern = re.compile(r'^hd|sd|xvd|vd')
@shared_task
......
......@@ -16,5 +16,6 @@ def on_user_created(sender, instance=None, created=False, **kwargs):
logger.debug("Receive user `{}` create signal".format(instance.name))
from .utils import send_user_created_mail
logger.info(" - Sending welcome mail ...".format(instance.name))
send_user_created_mail(instance)
if instance.email:
send_user_created_mail(instance)
......@@ -59,7 +59,10 @@ def send_user_created_mail(user):
'login_url': reverse('users:login', external=True),
}
if settings.DEBUG:
print(message)
try:
print(message)
except OSError:
pass
send_mail_async.delay(subject, message, recipient_list, html_message=message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment