| 
					
				 | 
			
			
				@@ -50,10 +50,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				              
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div class="section" id="frequently-asked-questions"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <h1>Frequently Asked Questions<a class="headerlink" href="#frequently-asked-questions" title="Permalink to this headline">¶</a></h1> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<div class="section" id="questions"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h2>Questions<a class="headerlink" href="#questions" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="mysql-is-throwing-deadlock-errors-what-can-i-do"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>MySQL is throwing deadlock errors, what can I do?<a class="headerlink" href="#mysql-is-throwing-deadlock-errors-what-can-i-do" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>MySQL is throwing deadlock errors, what can I do?<a class="headerlink" href="#mysql-is-throwing-deadlock-errors-what-can-i-do" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> MySQL has default isolation level set to <tt class="docutils literal"><span class="pre">REPEATABLE-READ</span></tt>, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if you don’t really need that, set it to <tt class="docutils literal"><span class="pre">READ-COMMITTED</span></tt>. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 You can do that by adding the following to your <tt class="docutils literal"><span class="pre">my.cnf</span></tt>:</p> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -66,31 +64,31 @@ Transaction Model and Locking</a> in the MySQL user manual.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p>(Thanks to Honza Kral and Anton Tsigularov for this solution)</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="celeryd-is-not-doing-anything-just-hanging"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>celeryd is not doing anything, just hanging<a class="headerlink" href="#celeryd-is-not-doing-anything-just-hanging" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>celeryd is not doing anything, just hanging<a class="headerlink" href="#celeryd-is-not-doing-anything-just-hanging" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <dl class="docutils"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <dt><strong>Answer:</strong> See <a class="reference internal" href="#mysql-is-throwing-deadlock-errors-what-can-i-do">MySQL is throwing deadlock errors, what can I do?</a>.</dt> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <dd>or <cite>Why is Task.delay/apply* just hanging?</cite>.</dd> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </dl> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="why-is-task-delay-apply-just-hanging"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Why is Task.delay/apply* just hanging?`<a class="headerlink" href="#why-is-task-delay-apply-just-hanging" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Why is Task.delay/apply* just hanging?`<a class="headerlink" href="#why-is-task-delay-apply-just-hanging" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> <tt class="xref docutils literal"><span class="pre">amqplib</span></tt> hangs if it isn’t able to authenticate to the 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 AMQP server, so make sure you are able to access the configured vhost using 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 the user and password.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="why-won-t-celeryd-run-on-freebsd"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Why won’t celeryd run on FreeBSD?<a class="headerlink" href="#why-won-t-celeryd-run-on-freebsd" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Why won’t celeryd run on FreeBSD?<a class="headerlink" href="#why-won-t-celeryd-run-on-freebsd" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> multiprocessing.Pool requires a working POSIX semaphore 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 implementation which isn’t enabled in FreeBSD by default. You have to enable 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 POSIX semaphores in the kernel and manually recompile multiprocessing.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="i-m-having-integrityerror-duplicate-key-errors-why"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>I’m having <tt class="docutils literal"><span class="pre">IntegrityError:</span> <span class="pre">Duplicate</span> <span class="pre">Key</span></tt> errors. Why?<a class="headerlink" href="#i-m-having-integrityerror-duplicate-key-errors-why" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>I’m having <tt class="docutils literal"><span class="pre">IntegrityError:</span> <span class="pre">Duplicate</span> <span class="pre">Key</span></tt> errors. Why?<a class="headerlink" href="#i-m-having-integrityerror-duplicate-key-errors-why" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> See <a class="reference internal" href="#mysql-is-throwing-deadlock-errors-what-can-i-do">MySQL is throwing deadlock errors, what can I do?</a>. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Thanks to howsthedotcom.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="why-won-t-my-task-run"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Why won’t my Task run?<a class="headerlink" href="#why-won-t-my-task-run" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Why won’t my Task run?<a class="headerlink" href="#why-won-t-my-task-run" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> Did you register the task in the applications <tt class="docutils literal"><span class="pre">tasks.py</span></tt> module? 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 (or in some other module Django loads by default, like <tt class="docutils literal"><span class="pre">models.py</span></tt>?). 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 Also there might be syntax errors preventing the tasks module being imported.</p> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,11 +102,11 @@ task manually:</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 if it’s able to find the task, or if some other error is happening.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="why-won-t-my-periodic-task-run"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Why won’t my Periodic Task run?<a class="headerlink" href="#why-won-t-my-periodic-task-run" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Why won’t my Periodic Task run?<a class="headerlink" href="#why-won-t-my-periodic-task-run" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> See <a class="reference internal" href="#why-won-t-my-task-run">Why won’t my Task run?</a>.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="how-do-i-discard-all-waiting-tasks"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>How do I discard all waiting tasks?<a class="headerlink" href="#how-do-i-discard-all-waiting-tasks" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>How do I discard all waiting tasks?<a class="headerlink" href="#how-do-i-discard-all-waiting-tasks" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> Use <tt class="docutils literal"><span class="pre">celery.task.discard_all()</span></tt>, like this:</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">discard_all</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <span class="gp">>>> </span><span class="n">discard_all</span><span class="p">()</span> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,7 +118,7 @@ if it’s able to find the task, or if some other error is happening.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 accomplish the same thing.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="i-ve-discarded-messages-but-there-are-still-messages-left-in-the-queue"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>I’ve discarded messages, but there are still messages left in the queue?<a class="headerlink" href="#i-ve-discarded-messages-but-there-are-still-messages-left-in-the-queue" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>I’ve discarded messages, but there are still messages left in the queue?<a class="headerlink" href="#i-ve-discarded-messages-but-there-are-still-messages-left-in-the-queue" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> Tasks are acknowledged (removed from the queue) as soon 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 as they are actually executed. After the worker has received a task, it will 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 take some time until it is actually executed, especially if there are a lot 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -133,7 +131,7 @@ waiting tasks you have to stop all the workers, and then discard the tasks 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using <tt class="docutils literal"><span class="pre">discard_all</span></tt>.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="can-i-use-celery-with-activemq-stomp"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Can I use celery with ActiveMQ/STOMP?<a class="headerlink" href="#can-i-use-celery-with-activemq-stomp" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Can I use celery with ActiveMQ/STOMP?<a class="headerlink" href="#can-i-use-celery-with-activemq-stomp" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer</strong>: Yes. But this is somewhat experimental for now. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 It is certainly working ok for me in a test configuration, but it has not 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 been tested in production like RabbitMQ. If you have any problems with 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -186,7 +184,7 @@ the one with the most capabilities won).</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 specific options.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="which-features-are-not-supported-when-using-stomp"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Which features are not supported when using STOMP?<a class="headerlink" href="#which-features-are-not-supported-when-using-stomp" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Which features are not supported when using STOMP?<a class="headerlink" href="#which-features-are-not-supported-when-using-stomp" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p>This is a (possible incomplete) list of features not available when 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using the STOMP backend:</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <ul class="simple"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -197,7 +195,7 @@ using the STOMP backend:</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="can-i-send-some-tasks-to-only-some-servers"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Can I send some tasks to only some servers?<a class="headerlink" href="#can-i-send-some-tasks-to-only-some-servers" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Can I send some tasks to only some servers?<a class="headerlink" href="#can-i-send-some-tasks-to-only-some-servers" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> As of now there is only one use-case that works like this, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 and that is tasks of type <tt class="docutils literal"><span class="pre">A</span></tt> can be sent to servers <tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt>, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 while tasks of type <tt class="docutils literal"><span class="pre">B</span></tt> can be sent to server <tt class="docutils literal"><span class="pre">z</span></tt>. One server can’t 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -263,7 +261,7 @@ configuration:</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <div class="section" id="can-i-use-celery-without-django"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<h3>Can I use celery without Django?<a class="headerlink" href="#can-i-use-celery-without-django" title="Permalink to this headline">¶</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<h2>Can I use celery without Django?<a class="headerlink" href="#can-i-use-celery-without-django" title="Permalink to this headline">¶</a></h2> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p><strong>Answer:</strong> Yes.</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <p>Celery uses something called loaders to read/setup configuration, import 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 modules that registers tasks and to decide what happens when a task is 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -333,7 +331,6 @@ run <tt class="docutils literal"><span class="pre">celeryinit</span></tt> to cre 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </pre></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -345,7 +342,6 @@ run <tt class="docutils literal"><span class="pre">celeryinit</span></tt> to cre 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <h3><a href="index.html">Table Of Contents</a></h3> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <li><a class="reference external" href="">Frequently Asked Questions</a><ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<li><a class="reference external" href="#questions">Questions</a><ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <li><a class="reference external" href="#mysql-is-throwing-deadlock-errors-what-can-i-do">MySQL is throwing deadlock errors, what can I do?</a></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <li><a class="reference external" href="#celeryd-is-not-doing-anything-just-hanging">celeryd is not doing anything, just hanging</a></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <li><a class="reference external" href="#why-is-task-delay-apply-just-hanging">Why is Task.delay/apply* just hanging?`</a></li> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -361,8 +357,6 @@ run <tt class="docutils literal"><span class="pre">celeryinit</span></tt> to cre 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <li><a class="reference external" href="#can-i-use-celery-without-django">Can I use celery without Django?</a></li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</li> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </ul> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <h4>Previous topic</h4> 
			 |