Skip to main content

Posts

Showing posts from 2017

Getting started with Celery and Redis

Points will be coverd -> When to use Celery. Why to use Celery. A simple celery program. Having a slow script and making it faster using celery. Celery configuration and code in different files. Using celery with tasks spanned across multiple modules Using celery with a package. Redis and celery on separate machine Web-application/script and celery on separate machines. When to use Celery Celery is a task processing system. It is useful in a lot of web applications. It can be used in following scenarios. To do any network call in a request-response cycle. Server should respond immediately to any web request it receives. If some network call is required during a request-response cycle, it should be done outside of request-response cycle. eg: An activation email needs to be sent when user signs up on a site. Sending the email is a network call and might take 2-3 seconds. User should not be made to wait for these 2-3 seconds. So sending activation email should be d