Commit 22883c4
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 <johann.schmitz@dc1.com>1 parent 4c5f866 commit 22883c4
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
0 commit comments