<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Avil Page (Posts about celery)</title><link>https://avilpage.com/</link><description></description><atom:link href="https://avilpage.com/tags/celery.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Fri, 25 Sep 2026 10:35:56 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Load Testing Celery With Different Brokers</title><link>https://avilpage.com/2018/02/load-testing-celery-brokers.html</link><dc:creator>Anand Reddy Pandikunta</dc:creator><description>&lt;p&gt;Celery is mainly used to offload work from request/response cycle in web applications and to build pipelines in data processing applications. Lets run a load test on celery to see how well it queues the tasks with various brokers.&lt;/p&gt;
&lt;p&gt;Let us take a simple add task and measure queueing time.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;timeit&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;celery&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Celery&lt;/span&gt;

&lt;span class="n"&gt;broker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'memory://'&lt;/span&gt;


&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Celery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;broker&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;broker&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="nd"&gt;@app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;


&lt;span class="n"&gt;tasks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
&lt;span class="n"&gt;start_time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;timeit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;default_timer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="n"&gt;duration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;timeit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;default_timer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;start_time&lt;/span&gt;
&lt;span class="n"&gt;rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;duration&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{}&lt;/span&gt;&lt;span class="s2"&gt; tasks/sec"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;On development machine, with AMD A4-5000 CPU, queueing time is as follows&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;memory ---&amp;gt; 400 tasks/sec&lt;/li&gt;
&lt;li&gt;rabbitmq ---&amp;gt; 300 tasks/sec&lt;/li&gt;
&lt;li&gt;redis ---&amp;gt; 250 tasks/sec&lt;/li&gt;
&lt;li&gt;postgres ---&amp;gt; 30 tasks/sec&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On production machine, with Intel(R) Xeon(R) CPU E5-2676, queueing time is as follows&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;memory ---&amp;gt; 2000 tasks/sec&lt;/li&gt;
&lt;li&gt;rabbitmq ---&amp;gt; 1400 tasks/sec&lt;/li&gt;
&lt;li&gt;redis ---&amp;gt; 1200 tasks/sec&lt;/li&gt;
&lt;li&gt;postgres ---&amp;gt; 200 tasks/sec&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For low/medium traffic webistes and applications, 1000 tasks/second should be fine. For high traffic webistes, there will be multiple servers queueing up the tasks.&lt;/p&gt;
&lt;p&gt;Incase if we need to queue the tasks at a higher rate and if we have task arguments before hand, we can chunk the tasks.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="n"&gt;tasks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will divide 1000 tasks into 10 groups of 100 tasks each. As there is no messaging overhead, it can queue any number of tasks in less than a second.&lt;/p&gt;</description><category>celery</category><category>python</category><guid>https://avilpage.com/2018/02/load-testing-celery-brokers.html</guid><pubDate>Fri, 09 Feb 2018 13:49:18 GMT</pubDate></item><item><title>How To Auto Reload Celery Workers In Development?</title><link>https://avilpage.com/2017/05/how-to-auto-reload-celery-workers-in-development.html</link><dc:creator>Anand Reddy Pandikunta</dc:creator><description>&lt;p&gt;We can pass &lt;code&gt;--autoreload&lt;/code&gt; option when starting celery worker. This will restart worker when codebase changes.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;celery&lt;span class="w"&gt; &lt;/span&gt;worker&lt;span class="w"&gt; &lt;/span&gt;-l&lt;span class="w"&gt; &lt;/span&gt;info&lt;span class="w"&gt; &lt;/span&gt;-A&lt;span class="w"&gt; &lt;/span&gt;foo&lt;span class="w"&gt; &lt;/span&gt;--autoreload
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Unfortunately, it doesn't work as expected and &lt;a href="https://github.com/celery/celery/issues/1658"&gt;it is deprecated&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During development, we will keep on changing the code base. Manually restarting  celery worker everytime is a tedious process. It would be handy if workers can be auto reloaded whenever there is a change in the codebase.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pypi.python.org/pypi/watchdog"&gt;Watchdog&lt;/a&gt; provides Python API and shell utilities to monitor file system events. We can install it with&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;pip&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;watchdog
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Watchdog provides &lt;code&gt;watchmedo&lt;/code&gt; a shell utilitiy to perform actions based on file events. It has &lt;code&gt;auto-restart&lt;/code&gt; subcommand to start a long-running subprocess and restart it. So, celery workers can be auto restarted using this.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;watchmedo&lt;span class="w"&gt; &lt;/span&gt;auto-restart&lt;span class="w"&gt; &lt;/span&gt;--&lt;span class="w"&gt; &lt;/span&gt;celery&lt;span class="w"&gt; &lt;/span&gt;worker&lt;span class="w"&gt; &lt;/span&gt;-l&lt;span class="w"&gt; &lt;/span&gt;info&lt;span class="w"&gt; &lt;/span&gt;-A&lt;span class="w"&gt; &lt;/span&gt;foo
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;By default it will watch for all files in current directory. These can be changed by passing corresponding parameters.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;watchmedo&lt;span class="w"&gt; &lt;/span&gt;auto-restart&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'*.py'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--&lt;span class="w"&gt; &lt;/span&gt;celery&lt;span class="w"&gt; &lt;/span&gt;worker&lt;span class="w"&gt; &lt;/span&gt;-l&lt;span class="w"&gt; &lt;/span&gt;info&lt;span class="w"&gt; &lt;/span&gt;-A&lt;span class="w"&gt; &lt;/span&gt;foo
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you are using django and don't want to depend on watchdog, there is a simple trick to achieve this. Django has autoreload utility which is used by &lt;code&gt;runserver&lt;/code&gt; to restart WSGI server when code changes.&lt;/p&gt;
&lt;p&gt;The same functionality can be used to reload celery workers. Create a seperate management command called &lt;code&gt;celery&lt;/code&gt;. Write a function to kill existing worker and start new worker. Now hook this function to autoreload as follows.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;shlex&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;subprocess&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;django.core.management.base&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseCommand&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;django.utils&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;autoreload&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;restart_celery&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'pkill -9 celery'&lt;/span&gt;
    &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shlex&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="n"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'celery worker -l info -A foo'&lt;/span&gt;
    &lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shlex&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;Command&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseCommand&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Starting celery worker with autoreload...'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;autoreload&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;restart_celery&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now you can run celery worker with &lt;code&gt;python manage.py celery&lt;/code&gt; which will start a celery worker and autoreload it when codebase changes.&lt;/p&gt;</description><category>automation</category><category>celery</category><category>python</category><guid>https://avilpage.com/2017/05/how-to-auto-reload-celery-workers-in-development.html</guid><pubDate>Sun, 07 May 2017 04:22:47 GMT</pubDate></item><item><title>Scaling Celery - Sending Tasks To Remote Machines</title><link>https://avilpage.com/2014/11/scaling-celery-sending-tasks-to-remote.html</link><dc:creator>Anand Reddy Pandikunta</dc:creator><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
    &lt;h4 style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.25em; line-height: 1.4; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
    Celery:&lt;/h4&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    Celery is a Python package which implements a task queue mechanism with a foucs on real-time processing, while also supporting task scheduling.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    It has 3 main components.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;strong style="box-sizing: border-box;"&gt;Celery Application(or Client):&lt;/strong&gt; It is responsible for adding tasks to the queue.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;strong style="box-sizing: border-box;"&gt;Celery Worker(or Server):&lt;/strong&gt; It is responsible for executing the tasks given to it.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;strong style="box-sizing: border-box;"&gt;Broker:&lt;/strong&gt; It is responsible for transporting messages between client and server.
    &lt;/div&gt;

    &lt;h4 style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.25em; line-height: 1.4; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
    &lt;a aria-hidden="true" class="anchor" href="http://localhost:6419/#what-you-should-know" id="user-content-what-you-should-know" style="box-sizing: border-box; color: #4078c0; cursor: pointer; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;" name="user-content-what-you-should-know"&gt;&lt;/a&gt;What You Should Know:&lt;/h4&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    You should know basics of Celery and you should be familiar with
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    creating celery tasks
    &lt;/div&gt;

    &lt;div class="highlight highlight-source-python" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;from&lt;/span&gt; celery &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;import&lt;/span&gt; Celery&lt;br&gt;&lt;br&gt;app &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt; Celery(&lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;tasks&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="pl-v" style="box-sizing: border-box; color: #ed6a43;"&gt;backend&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt;&lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;amqp&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt;,&lt;br&gt;                      &lt;span class="pl-v" style="box-sizing: border-box; color: #ed6a43;"&gt;broker&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt;&lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;amqp://&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;@&amp;lt;ip&amp;gt;/&amp;lt;vhost&amp;gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;br&gt;&lt;br&gt;&lt;span class="pl-en" style="box-sizing: border-box; color: #795da3;"&gt;@app.task&lt;/span&gt;&lt;br&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;def&lt;/span&gt; &lt;span class="pl-en" style="box-sizing: border-box; color: #795da3;"&gt;add&lt;/span&gt;(&lt;span class="pl-smi" style="box-sizing: border-box;"&gt;x&lt;/span&gt;, &lt;span class="pl-smi" style="box-sizing: border-box;"&gt;y&lt;/span&gt;):&lt;br&gt;    &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;return&lt;/span&gt; x &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;+&lt;/span&gt; y
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    adding tasks to a queue,
    &lt;/div&gt;

    &lt;div class="highlight highlight-source-python" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

add.apply_async(&lt;span class="pl-v" style="box-sizing: border-box; color: #ed6a43;"&gt;args&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt;[&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;1&lt;/span&gt;,&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;2&lt;/span&gt;])
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    and consuming tasks with a worker
    &lt;/div&gt;

    &lt;div class="highlight highlight-source-shell" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

celery worker -A my_app -l info
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    If your tasks doesn't need much system resources, you can setup all of them in the same machine. But, if you have a lot of jobs which consume resources,
    then you need to spread them out in several machines.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    In this tutorial lets move our celery workers into a remote machine keeping client and broker in same machine.
    &lt;/div&gt;

    &lt;h4 style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.25em; line-height: 1.4; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
    &lt;a aria-hidden="true" class="anchor" href="http://localhost:6419/#sending-tasks-to-another-machine" id="user-content-sending-tasks-to-another-machine" style="box-sizing: border-box; color: #4078c0; cursor: pointer; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;" name="user-content-sending-tasks-to-another-machine"&gt;&lt;/a&gt;Sending Tasks To Another Machine:&lt;/h4&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;strong style="box-sizing: border-box;"&gt;On Machine A:&lt;/strong&gt;
    &lt;/div&gt;

    &lt;ol style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
    &lt;li style="box-sizing: border-box;"&gt;
        &lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
          Install Celery &amp;amp; RabbitMQ.
        &lt;/div&gt;
      &lt;/li&gt;

      &lt;li style="box-sizing: border-box;"&gt;
        &lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
          Configure RabbitMQ so that Machine B can connect to it.
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ol&gt;

    &lt;div class="highlight highlight-source-shell" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

&lt;span class="pl-c" style="box-sizing: border-box; color: #969896;"&gt;# add new user&lt;/span&gt;&lt;br&gt;sudo rabbitmqctl add_user &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;user&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;password&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class="pl-c" style="box-sizing: border-box; color: #969896;"&gt;# add new virtual host&lt;/span&gt;&lt;br&gt;sudo rabbitmqctl add_vhost &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;vhost_name&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class="pl-c" style="box-sizing: border-box; color: #969896;"&gt;# set permissions for user on vhost&lt;/span&gt;&lt;br&gt;sudo rabbitmqctl set_permissions -p &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;vhost_name&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;user&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;.*&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;.*&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt; &lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;.*&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class="pl-c" style="box-sizing: border-box; color: #969896;"&gt;# restart rabbit&lt;/span&gt;&lt;br&gt;sudo rabbitmqctl restart
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;ol style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
    &lt;li style="box-sizing: border-box;"&gt;Create a new file remote.py with a simple task. Here we have broker installed in machine A. So give ip address of
    machine 1 in broker url option.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;div class="highlight highlight-source-python" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;from&lt;/span&gt; celery &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;import&lt;/span&gt; Celery&lt;br&gt;&lt;br&gt;app &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt; Celery(&lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;tasks&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class="pl-v" style="box-sizing: border-box; color: #ed6a43;"&gt;backend&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt;&lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;amqp&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt;,&lt;br&gt;                      &lt;span class="pl-v" style="box-sizing: border-box; color: #ed6a43;"&gt;broker&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;=&lt;/span&gt;&lt;span class="pl-s" style="box-sizing: border-box; color: #183691;"&gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;amqp://&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;@&amp;lt;ip&amp;gt;/&amp;lt;vhost&amp;gt;&lt;span class="pl-pds" style="box-sizing: border-box;"&gt;'&lt;/span&gt;&lt;/span&gt;)&lt;br&gt;&lt;br&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;def&lt;/span&gt; &lt;span class="pl-en" style="box-sizing: border-box; color: #795da3;"&gt;add&lt;/span&gt;(&lt;span class="pl-smi" style="box-sizing: border-box;"&gt;x&lt;/span&gt;, &lt;span class="pl-smi" style="box-sizing: border-box;"&gt;y&lt;/span&gt;):&lt;br&gt;     &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;return&lt;/span&gt; x &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;+&lt;/span&gt; y
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;ol style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
    &lt;li style="box-sizing: border-box;"&gt;Now we have everything setup on machine A. We can now put some tasks in queue.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;div class="highlight highlight-source-python" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

In [&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;1&lt;/span&gt;]: &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;from&lt;/span&gt; remote &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;import&lt;/span&gt; add&lt;br&gt;&lt;br&gt;In [&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;2&lt;/span&gt;]: add.delay(&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;1&lt;/span&gt;, &lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;2&lt;/span&gt;)&lt;br&gt;Out[&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;2&lt;/span&gt;]: &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;AsyncResult: &lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;3eb96a11&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;aa61&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;46d3&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;9b9d&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;e0e1703438d0&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;In [&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;3&lt;/span&gt;]: b.delay(&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;2&lt;/span&gt;, &lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;3&lt;/span&gt;)&lt;br&gt;Out[&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;3&lt;/span&gt;]: &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;AsyncResult: ec40db1a&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;a43c&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;4486&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;9530&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;0a3153fe1380&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;In [&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;4&lt;/span&gt;]: b.delay(&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;3&lt;/span&gt;, &lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;4&lt;/span&gt;)&lt;br&gt;Out[&lt;span class="pl-c1" style="box-sizing: border-box; color: #0086b3;"&gt;4&lt;/span&gt;]: &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;lt;&lt;/span&gt;AsyncResult: ca53a4c7&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;061b&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;408e&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;82ee&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;-&lt;/span&gt;&lt;span class="pl-ii" style="background-color: #b52a1d; box-sizing: border-box; color: #f8f8f8;"&gt;86c2d43d21a0&lt;/span&gt;&lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    Everything is setup on machine A. Now lets get into machine B.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;strong style="box-sizing: border-box;"&gt;On Machine B:&lt;/strong&gt;
    &lt;/div&gt;

    &lt;ol style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
    &lt;li style="box-sizing: border-box;"&gt;Install Celery.&lt;/li&gt;

      &lt;li style="box-sizing: border-box;"&gt;
        &lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
          Copy remote.py file from machine A to this machine.
        &lt;/div&gt;
      &lt;/li&gt;

      &lt;li style="box-sizing: border-box;"&gt;
        &lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
          Run a worker to consume the tasks
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ol&gt;

    &lt;div class="highlight highlight-source-shell" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

celery worker -l info -A remote
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    As soon as you launch the worker, you will receive the tasks you queued up and gets executed immediately.
    &lt;/div&gt;

    &lt;div class="highlight highlight-source-shell" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    &lt;pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"&gt;

[2014-11-09 00:01:19,168: INFO/MainProcess] Received task: remote.add[c2d2bb27-ff5f-47da-b2b9-6fb11669ee1a]&lt;br&gt;[2014-11-09 00:01:19,170: INFO/MainProcess] Received task: remote.add[8daa1a5c-17d0-46dc-9c93-faf7fbeccdd9]&lt;br&gt;[2014-11-09 00:01:19,172: INFO/MainProcess] Received task: remote.add[79603d15-24f1-43f8-b8b7-525b7cd4b9a2]&lt;br&gt;[2014-11-09 00:01:19,401: INFO/MainProcess] Task remote.add[8daa1a5c-17d0-46dc-9c93-faf7fbeccdd9] succeeded &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;in&lt;/span&gt; 0.226168102003s: 3&lt;br&gt;[2014-11-09 00:01:19,462: INFO/MainProcess] Task remote.add[c2d2bb27-ff5f-47da-b2b9-6fb11669ee1a] succeeded &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;in&lt;/span&gt; 0.286503815001s: 5&lt;br&gt;[2014-11-09 00:01:19,464: INFO/MainProcess] Task remote.add[79603d15-24f1-43f8-b8b7-525b7cd4b9a2] succeeded &lt;span class="pl-k" style="box-sizing: border-box; color: #a71d5d;"&gt;in&lt;/span&gt; 0.288741396998s: 7
&lt;/pre&gt;
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    This is just a simple guide on how to send tasks to remote machines.
    &lt;/div&gt;

    &lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;"&gt;
    Depending on your need, you might have to set up a cluster of servers and route tasks accordingly to scale.
    &lt;/div&gt;

  &lt;/div&gt;</description><category>celery</category><category>django</category><category>python</category><guid>https://avilpage.com/2014/11/scaling-celery-sending-tasks-to-remote.html</guid><pubDate>Sun, 09 Nov 2014 08:35:00 GMT</pubDate></item></channel></rss>