1
0
Fork 0

Switch from priority queues to function-based queues

Fixes: #2907
This commit is contained in:
Wesley Aptekar-Cassels 2023-07-20 00:16:38 -04:00
parent 107f5b38ca
commit 3e78e398c0
21 changed files with 183 additions and 87 deletions

View file

@ -3,7 +3,7 @@ from django.core.mail import EmailMultiAlternatives
from django.template.loader import get_template
from bookwyrm import models, settings
from bookwyrm.tasks import app, HIGH
from bookwyrm.tasks import app, EMAIL
from bookwyrm.settings import DOMAIN
@ -75,7 +75,7 @@ def format_email(email_name, data):
return (subject, html_content, text_content)
@app.task(queue=HIGH)
@app.task(queue=EMAIL)
def send_email(recipient, subject, html_content, text_content):
"""use a task to send the email"""
email = EmailMultiAlternatives(