mirror of https://github.com/sipwise/repoapi.git
As of django-structlog v6.0.0, our django application fails with: | Traceback (most recent call last): | File "/var/lib/repoapi/venv_prod/lib/python3.9/site-packages/django/utils/module_loading.py", line 20, in import_string | return getattr(module, class_name) | AttributeError: module 'django_structlog.middlewares' has no attribute 'CeleryMiddleware' Quoting from https://django-structlog.readthedocs.io/en/latest/upgrade_guide.html#upgrading-to-6-0: | (If you use celery) Make sure you use DJANGO_STRUCTLOG_CELERY_ENABLED = True | | It is only applicable if you use celery integration. | | django_structlog.middlewares.CeleryMiddleware has been remove in favor of a django settings. | | MIDDLEWARE += [ | "django_structlog.middlewares.RequestMiddleware", | # "django_structlog.middlewares.CeleryMiddleware", # <- remove this | ] | | DJANGO_STRUCTLOG_CELERY_ENABLED = True # <-- add this Instead of forcing usage of an older django-structlog version, let's make sure we have 6.0 or newer and update configuration accordingly. Change-Id: I0449c05db682ace22438b8b0ad8d8a4a1dfca71amaster
parent
2556480954
commit
ebd9601fe2
Loading…
Reference in new issue