Django Celery with RabbitMQ

I am trying to run a task with Celery. I follow these tutorials link

Everything was successfully configured. The fact is that I do not know how to complete the task. I launched celery, and he could not find this task. I want to know what exactly I need to call to complete the task and how I need to configure the task on the RabbitMQ server, django-admin .. I can not find any complete manuals about this.

+4
source share
3 answers

Django, for example, contains a complete section on using Celery with RabbitMQ. There are also free tutorials or articles on the subject.

+4

/tasks.py:

from celery import shared_task

@shared_task
def add(param1,param2)
  print("task")

:

from celery import current_app
current_app.send_task("app.tasks.add", ["param1", "param2"])
+2

Source: https://habr.com/ru/post/1629505/


All Articles