Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with Celery(How to eat Celery )

Getting Started with Celery(How to eat Celery )

How to start working with Celery , an asynchronous task queue/job queue based on distributed message passing.

Avatar for Ridwan Ahmed Khan

Ridwan Ahmed Khan

August 29, 2014

Other Decks in Technology

Transcript

  1. What is Celery? This is it ! It is a

    vegetable. So are we going to discuss how to cook or eat?
  2. Little addition It is focused on real time operation but

    scheduled job can be performed. Also tasks can execute asynchronously(in the background) or synchronously(wait until ready)
  3. Explanation We have imported User model. Then using decorator above

    the function which creates an User with the two taken parameter- username and password. This is a Celery task.
  4. Now execute the task >>> from .tasks import send_email >>>

    send_mail(“[email protected]”, “Hi”, “Hello World”) The mail is instantaneously sent.The task decorator is called from the Celery app.The task is queued and when there is free resource to execute the task, then the task is executed.