notifications/apps/emails/tasks.py
Sayyid Hamid Mahdavi 5ac1715adb bulk push
2025-09-02 20:12:20 +03:30

12 lines
282 B
Python

from main import celery_app
from utils.clients import gotify
@celery_app.task
def send_email(push_message_uuid):
from .models import Email
email = Email.objects.get(uuid=push_message_uuid)
email.send_email()
email.state = email.StateChoices.DONE
email.save()