[Fixed]-Django-celery warnings about settings.DEBUG

21πŸ‘

βœ…

It is what it says it is – a warning that settings.DEBUG should not be set for production deployments. If you’re just using it for development, then it is not something to be concerned about. In general, this ought to apply whether you use django-celery or not.

I have not looked up the details, but as mentioned in this answer:

When DEBUG is enabled Django appends every executed SQL statement to django.db.connection.queries, this will grow unbounded in a long running process environment.

πŸ‘€Shawn Chin

1πŸ‘

The officially recommended way to start celeryd for django-celery is:

python manage.py celeryd --setting=settings

Today, I forgot this and directly start celeryd by

python -m celery.bin.celeryd --config=settings

and viola, no warnings! And it works just fine! The Celery group really need to work on their docs. Although it seems comprehensive, some key pieces are missing to cover all the grounds imho.

πŸ‘€airfang

0πŸ‘

Actually… Django stopped leaking memory in Django 1.8 https://github.com/django/django/commit/cfcca7ccce3dc527d16757ff6dc978e50c4a2e61

A fix for celery such that it won’t complain anymore is underway.

0πŸ‘

As of Django 1.8, Django no longer leaks memory when DEBUG=True.

See https://github.com/celery/celery/pull/7626. This pull request removed the out dated warning and will be included in the Celery 5.3 release.

πŸ‘€B16Tasty

Leave a comment