<metaname="description" content="Full Stack Python explains each layer of the web application stack, from the server up through the rendering in a user's browser.">
is a presentation for what task queues are and why they are needed. </p>
</li>
<li>
<p><ahref="https://www.digitalocean.com/community/articles/how-to-use-celery-with-rabbitmq-to-queue-tasks-on-an-ubuntu-vps">How to use Celery with RabbitMQ</a>
is a detailed walkthrough for using these tools on an Ubuntu VPS.</p>
</li>
<li>
<p>Heroku has a clear walkthrough for using
<ahref="https://devcenter.heroku.com/articles/python-rq">RQ for background tasks</a>.</p>
</li>
<li>
<p><ahref="http://www.linuxforu.com/2013/12/introducing-celery-pythondjango/">Introducing Celery for Python+Django</a>
provides an introduction to the Celery task queue.</p>
</li>
<li>
<p>The "Django in Production" series by
<ahref="https://twitter.com/robgolding63">Rob Golding</a> contains a post
specifically on <ahref="http://www.robgolding.com/blog/2011/11/27/django-in-production-part-2---background-tasks/">Background Tasks</a>.</p>
</li>
<li>
<p><ahref="http://blog.thecodepath.com/2012/11/15/asynchronous-processing-in-web-applications-part-1-a-database-is-not-a-queue/">Asynchronous Processing in Web Applications Part One</a>
and <ahref="http://blog.thecodepath.com/2013/01/06/asynchronous-processing-in-web-applications-part-2-developers-need-to-understand-message-queues/">Part Two</a>
are great reads for understanding the difference between a task queue and
why you shouldn't use your database as one.</p>
</li>
</ul>
<h2>Task queue learning checklist</h2>
<p><iclass="fa fa-check-square-o"></i>
Pick a slow function in your project that is called during an HTTP request.</p>
<p><iclass="fa fa-check-square-o"></i>
Determine if you can precompute the results on a fixed interval instead of
during the HTTP request. If so, create a separate function you can call
from elsewhere then store the precomputed value in the database.</p>
<p><iclass="fa fa-check-square-o"></i>
Read the Celery documentation and the links in the resources section below
to understand how the project works.</p>
<p><iclass="fa fa-check-square-o"></i>
Install a message broker such as RabbitMQ or Redis and then add Celery to your
project. Configure Celery to work with the installed message broker.</p>
<p><iclass="fa fa-check-square-o"></i>
Use Celery to invoke the function from step one on a regular basis.</p>
<p><iclass="fa fa-check-square-o"></i>
Have the HTTP request function use the precomputed value instead of the
<h4>Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.</h4>
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator