Answer the question
In order to leave comments, you need to log in
How to properly organize celery redis queues?
Good day. Tell me, knowledgeable people.
I have created my "broadcast" application. The situation is such that you need to create several mailings (10 pieces), and each set its own time (day, month, time).
I indicated in the task
@task(name='mailer.send_db_mail', default_retry_delay=SEND_RETRY_DELAY)
def send_db_mail(*args, **kwargs):
from mailer.send_mail import SendMail
from models import MailTemplate,Subscriber
try:
subscriber = Subscriber.objects.filter(is_finish=False).order_by("date_send")[0]
if subscriber:
#рассылаем
Answer the question
In order to leave comments, you need to log in
There are groupings of tasks in Celery in Celery celery.readthedocs.org/en/latest/userguide/canvas....
Probably chain will suit you - each next task is executed after the end of the previous one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question