You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Recently we updated Celery to 4.0 in our Django project. The logging gave us some headaches and I would like to help fellow hackers so they don't get stuck on this.
The issue is described in the Celery issue tracker but disregarded as they don't have enough resources to work on it: celery/celery#2437
We had to implement 2 things:
Set CELERYD_HIJACK_ROOT_LOGGER to False in our settings.
And connect to the setup_logging signal from Celery:
from celery import signals
@signals.setup_logging.connect
def setup_logging(**kwargs):
"""Setup logging."""
pass
I also got confused from the settings described on the page about Celery in the Sentry docs. The code there doesn't seem to be required for us. Not sure if we can change something about this to make it more clear when you should use that. Only when you are running celery<4.0 maybe? https://docs.sentry.io/clients/python/integrations/celery/
Otherwise, the docs are great, thank you for that!
What do you guys think?
mindojo-victor, f14c0, dimrozakis, hartror, magicjohnson and 4 more