Celery

2,404 views

Published on

Using django-celery - learnings from Yipit.com

Published in: Technology
  • Be the first to comment

Celery

  1. 1. Django CeleryHow to handle asynchronous tasks in Django
  2. 2. What is Celery?
  3. 3. Don’t Block the User
  4. 4. Speed
  5. 5. Scale
  6. 6. Use Cases• Logging• Regular twitter updates• Sending 10k (or more!) emails
  7. 7. Choosing a Message Queue• MongoDB Celery Documentation• CouchDB and most installations• Beanstalk use RabbitMQ - and so should you.• Redis• RabbitMQ
  8. 8. Queues vs. Hosts
  9. 9. Tools and Command• sudo rabbitmqctl set_permissions user_name “.*” “.*” “.*”• ./manage.py celeryd -c6• ./manage.py camqadm• sudo rabbitmqctl list_queues
  10. 10. Setting up a Daemon on Ubuntu• Copy celeryd from https://github.com/ask/ celery/tree/master/contrib/debian/init.d/ to / etc/init.d/• Copy gist from https://gist.github.com/702593 to /etc/default/celeryd• Update runlevels: sudo update-rc.d celeryd defaults• Start celeryd: sudo service celeryd start
  11. 11. Yipit Django Team• http://tech.yipit.com/• Adam Nelson - @varud• Zach Smith - @zmsmith• Nitya Oberoi - @nityaoberoi

×