Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role of django-celery is unclear #335

Closed
brianmay opened this issue Aug 4, 2014 · 17 comments
Closed

Role of django-celery is unclear #335

brianmay opened this issue Aug 4, 2014 · 17 comments

Comments

@brianmay
Copy link

brianmay commented Aug 4, 2014

See celery/celery#2174

@adriaant
Copy link

adriaant commented Aug 4, 2014

This section of the documentation explains when you need django-celery: http://docs.celeryproject.org/en/master/django/first-steps-with-django.html#using-the-django-orm-cache-as-a-result-backend

@brianmay
Copy link
Author

brianmay commented Aug 7, 2014

Unfortunately the celery documentation seems to conflict with the django-celery documentation that says:

Warning

THIS PROJECT IS NO LONGER REQUIRED

Please follow the new tutorial at:

http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html

github describes the project as:

Old Celery integration project for Django

Furthermore, if you attempt to get to the documentation at http://django-celery.readthedocs.org/en/latest/ there is:

Documentation has MOVED!

The django-celery documentation has been moved as a subsection of the main Celery documentation. Go to the Development documentation, or the Stable documentation.

The celery documentation doesn't really do anything to cover django-celery. Furthermore it seems to list steps that aren't required (I have never had to manually set CELERY_RESULT_BACKEND), and skips steps that are required (calling djcelery.setup_loader() from settings.py seems to be essential). It doesn't document any of the additional features django-celery provides, e.g. the management command line interface or the db models.

I think I found the django-celery documentation somewhere, but it really is not easy to find with all these redirects to the celery project.

@mikeumus
Copy link
Contributor

@brianmay if there's docs besides just the ReadMe here, I'd be most grateful. I've spent 3 days trying to get django-celery working. I got a pull request merged (#381) that removed the broken link to django-celery.readthedocs.org but if you think a readthedocs still is out there for django-celery, that link should be referenced even if it's old.

Django-Celery is still very useful in theory (if I could get it showing tasks) simply for that fact of recycling awesome code that allows to set schedules of tasks and task reporting. Very awesome. I'm of the camp that it shouldn't be labeled too harshly as "No longer required", maybe "django-celery is a supplemental module giving many nice features to django admin like scheduling of tasks."

I setup an example project using celery/examples/django and following all the docs I could find on django-celery but tasks still aren't showing up in django-admin:

Posted my issue on Stack Overflow as well:

You can work directly in the same Ubuntu environment I am for my django-celery-example project to experiment with why tasks may not be showing up here in Cloud 9

@ionelmc
Copy link
Collaborator

ionelmc commented Jun 20, 2015

@mikeumus Are you running the celery events daemon? You should be running something like celery events --camera=djcelery.snapshot.Camera.

What output you get from that? --loglevel=DEBUG could help with figuring out the issue.

@mikeumus
Copy link
Contributor

@ionelmc, I wasn't running the camera before, just did now though and used --loglevel=DEBUG and got this: https://gist.github.com/mikeumus/133631d3fa66ad53280c

@ionelmc
Copy link
Collaborator

ionelmc commented Jun 20, 2015

@mikeumus Well then keep the camera running and report if you're still missing the task data from the djangoadmin.

@mikeumus
Copy link
Contributor

@ionelmc, I had the camera running, django and the task separately but nothing showed up. Can try it again. It says the camera is (every 1.0 secs.) so should be showing up.

@ionelmc
Copy link
Collaborator

ionelmc commented Jun 20, 2015

You did set the correct app for the events daemon right? (-A proj)

And you enabled the events in the settings? (http://docs.celeryproject.org/en/latest/configuration.html?highlight=events#celery-send-events)

@mikeumus
Copy link
Contributor

@ionelmc I set CELERY_SEND_EVENTS = 'true' but still no tasks are showing in admin. You can view the project in my Cloud 9 ubuntu environment here if you'd like, just request write access and I'll grant it:

@ionelmc
Copy link
Collaborator

ionelmc commented Jun 20, 2015

Can you pastebin again output from both daemons?

@mikeumus
Copy link
Contributor

@ionelmc added the event camera output in the gist.

@ionelmc
Copy link
Collaborator

ionelmc commented Jun 20, 2015

You don't seem to be running any tasks in the worker. What did you expect to see in the admin?

@mikeumus
Copy link
Contributor

@ionelmc Doesn't this part mean the task is running? or am I misunderstanding it.

Should I run it with celery multi instead?

@ionelmc
Copy link
Collaborator

ionelmc commented Jun 21, 2015

I suspect you don't need multi at all.

@brianmay
Copy link
Author

@mikeumus Thought there was something, can't find anything right however. I see that there is old documentation on readthedocs (see menu at bottom right of page), possibly this is what I was thinking of.

Not sure if this is any use. I would assume readthedocs documentation comes from the django-celery git source, so presumably everything should be available there, even if you have search back in the git history.

@mikeumus
Copy link
Contributor

@ionelmc @brianmay Got my django-celery example project showing tasks in the django admin with some help from Yusuf from LiveCoding.tv: https://github.com/mikeumus/django-celery-example
Thanks for both of your helpings as well. 😄👍 💛

In it's README, every step one needs to get django-celery running and showing tasks is there. Please provide any feedback and feel free to share the project as much as is helpful. If you'd like we can transfer the repo anywhere as well (after I clean up the README further).

@auvipy
Copy link
Member

auvipy commented Dec 14, 2016

@mikeumus you could send PR for examples

@auvipy auvipy closed this as completed Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants