Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect celery configuration namespace (#351)
When configuring Celery with RabbitMQ in Django, one often uses `app.config_from_object('django.conf:settings', namespace='CELERY')` as per the Celery Quick Start (https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html). This requires that all configuration keys in the Django settings have to be prefixed with `CELERY_`. The previous implementation only used `settings.BROKER_URL` (which may be `None`). When passing `None` to Celery (or more specifically: the `Connection` object), it would default to `localhost`. Expand the `RabbitMQHealthCheck` to accept a `namespace` attribute which can be set to `CELERY` for example. Co-authored-by: Johann Schmitz <[email protected]>
- Loading branch information
22883c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How Can I defined it, I got this error : unavailable: Unable to connect to RabbitMQ: Connection was refused.
In my settings :
Celery.py file config :