【发布时间】:2021-10-04 00:00:03
【问题描述】:
任何人都可以在 Django 的 celery RabbitMQ 中解释这些行。它将在哪个时间使用? 我在没有这些行的情况下在 celery RabbitMq 中运行了 2 个任务(django 中的加法操作和端点)。所以请解释一下什么时候会在settings.py和celery rabbitmq中使用
CELERY_BROKER_URL = 'amqp://localhost'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
__init__.py :
from .celery import app as celery_app
__all__ = ('celery_app',)
提前致谢
【问题讨论】:
标签: python django rabbitmq celery