eventcally/project/base_tasks.py
2023-06-30 17:44:57 +02:00

13 lines
356 B
Python

from project import app, celery
from project.celery import force_locale
from project.views.utils import send_mails_with_body
@celery.task(
base=getattr(app, "celery_http_task_cls"),
priority=0,
)
def send_mail_with_body_task(recipient, subject, body, html):
with force_locale():
send_mails_with_body([recipient], subject, body, html)