|
|
|
Celery guys, please fix your documents
|
|
5 points
by starterkit
4447 days ago
|
|
Guys I dont have a blog but I must say this words, please dont blame me, I think someone will think exactly like me someday As a non-native speaker of English, sometimes I do have trouble with documentations, but read them again and again, until I feel comfortable which can take me 2-3x more effort than native speakers.
Recently, I got my hands dirty on celery. Celery is great, first steps is fine for very basic task management. But it sucks when it comes to Django. Hey Celery guys, as a beginner I have totally suck my brain when I read django first steps. Lets start from the beginning,
1) "If you have a modern Django project layout like: ", hey guys when you type django-admin.py startproject it doesnt create structure you mentioned.
2) app.config_from_object('django.conf:settings') , why the hell I need this, if you didn't mention what should be inside django.conf.settings yet.
3) celery.py: from __future__ import absolute_import. first we import absolute imports from the future, so that our celery.py module will not clash with the library. Hey guys please rename your celery.py instead of making ambiguous file names and fixing it with kind of "patch". You are explaining celery to the world where 4/5 is not native speaker or has basic level of language.
4) Using the Django ORM/Cache as a result backend. Maybe you will teach me how to use django orm as a broker first? instead of saving results but requiring 3rd party for message transportation.
5) pip install django-celery. so what about: Django is supported out of the box now so this document only contains a basic way to integrate Celery and Django. so do we need 3rd party or will you support it out of box?
And so on..... |
|
1) How does it differ from startproject? 2) That's how you tell Celery to use your Django project settings as a source of configuration. Did you read the 'First steps with Celery' guide first? 3) The old Python import behavior is very limiting, and starting from Python 3 absolute import is the default. We believe everyone should start using it by importing it in all modules, but you don't have to if you don't want to, just give it another name. 4) The Django result backend is a stable component, the Django ORM message transport is not, so we won't tell you how to use it in the introduction because we don't want you to. You can find the instructions here: http://docs.celeryproject.org/en/latest/getting-started/brok... 5) Everything is supported out of the box except for storing results using the Django ORM (there's built-in sqlalchemy result backend that can also be used, but it's not compatible with the Django backend as the data is stored in a slightly different way: https://github.com/celery/celery/issues/183)