Python – Tornado and Celery integration

My new project involves both tornado (as frontend, using tornado-json) and celery (as backend). After googling too much I found two different ways to integrate celery with tornado:

  1. using an IOLoop to check for task completion (stackoverflow)
  2. using a unix socket (Cyberfart’s Blog)

I prefer the IOLoop

Here is a simple email sender example

And the celery task

🙂

 

Posted in Python, Tutorial and tagged , , , .