Add utf-8 coding to all files

This commit is contained in:
jar3b 2018-12-05 19:28:12 +03:00
parent 975d3f5fee
commit ce45668971
5 changed files with 12 additions and 3 deletions

View File

@ -0,0 +1 @@
# coding: utf-8

View File

@ -1,3 +1,5 @@
# coding: utf-8
from django.core.mail.backends.base import BaseEmailBackend
from django.utils.encoding import force_text

View File

@ -1,3 +1,5 @@
# coding: utf-8
import logging
import sys

View File

@ -1,3 +1,5 @@
# coding: utf-8
from django.conf import settings
EMAIL_BACKEND = getattr(

View File

@ -1,3 +1,5 @@
# coding: utf-8
from time import sleep
import celery
@ -10,10 +12,10 @@ logger = get_task_logger(__name__)
@celery.task(bind=True, queue=TASK_QUEUE_NAME, acks_late=True, default_retry_delay=30)
def send_message(self, email):
logger.info('task started')
logger.warning('task started')
try:
sleep(5)
logger.info('task success')
logger.warning('task success')
except Exception as e:
logger.info('task error')
logger.warning('task error')
raise self.retry(exc=e)