From fc6555d7013e3797fd0f8928381ededd703a3539 Mon Sep 17 00:00:00 2001 From: NikDizell Date: Fri, 19 Jun 2026 18:55:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=20=D0=BF=D0=BE=D0=BD=D1=8F=D1=82?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=D0=B6=D1=83=D1=82=D1=8C=20=D1=81=20=D0=B8?= =?UTF-8?q?=D0=BC=D0=BF=D0=BE=D1=80=D1=82=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- programmer/utils/email_notifications.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programmer/utils/email_notifications.py b/programmer/utils/email_notifications.py index 22feaae..0337a90 100644 --- a/programmer/utils/email_notifications.py +++ b/programmer/utils/email_notifications.py @@ -261,13 +261,13 @@ def send_order_notification_async(order): """Выбирает способ отправки в зависимости от DEBUG.""" if settings.DEBUG: # Используем background-tasks - from ..tasks import send_order_notification_background + from programmer.tasks import send_order_notification_background send_order_notification_background(order.id) return True # задача поставлена в очередь else: # Используем Celery try: - from ..tasks import send_order_notification_celery + from programmer.tasks import send_order_notification_celery send_order_notification_celery.delay(order.id) return True except (ImportError, AttributeError): @@ -278,13 +278,13 @@ def send_order_notification_async(order): def send_multiple_order_notifications_async(orders): if settings.DEBUG: - from ..tasks import send_multiple_order_notifications_background + from programmer.tasks import send_multiple_order_notifications_background order_ids = list(orders.values_list('id', flat=True)) send_multiple_order_notifications_background(order_ids) return len(order_ids) else: try: - from ..tasks import send_multiple_order_notifications_celery + from programmer.tasks import send_multiple_order_notifications_celery order_ids = list(orders.values_list('id', flat=True)) send_multiple_order_notifications_celery.delay(order_ids) return len(order_ids)