Преглед изворни кода

Add new documentation files

Ask Solem пре 16 година
родитељ
комит
f7c8ee0f34

+ 190 - 0
reference/celery.execute.html

@@ -0,0 +1,190 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Executing Tasks - celery.execute &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Task Result - celery.result" href="celery.result.html" />
+    <link rel="prev" title="Defining Tasks - celery.task.base" href="celery.task.base.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.result.html" title="Task Result - celery.result"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.task.base.html" title="Defining Tasks - celery.task.base"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.execute">
+<h1>Executing Tasks - celery.execute<a class="headerlink" href="#module-celery.execute" title="Permalink to this headline">¶</a></h1>
+<dl class="function">
+<dt id="celery.execute.apply_async">
+<tt class="descclassname">celery.execute.</tt><tt class="descname">apply_async</tt><big>(</big><em>task</em>, <em>args=None</em>, <em>kwargs=None</em>, <em>routing_key=None</em>, <em>immediate=None</em>, <em>mandatory=None</em>, <em>connection=None</em>, <em>connect_timeout=4</em>, <em>priority=None</em>, <em>countdown=None</em>, <em>eta=None</em>, <em>**opts</em><big>)</big><a class="headerlink" href="#celery.execute.apply_async" title="Permalink to this definition">¶</a></dt>
+<dd><p>Run a task asynchronously by the celery daemon(s).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>task</em> &#8211; The task to run (a callable object, or a <tt class="xref docutils literal"><span class="pre">Task</span></tt>
+instance</li>
+<li><em>args</em> &#8211; The positional arguments to pass on to the task (a <tt class="docutils literal"><span class="pre">list</span></tt>).</li>
+<li><em>kwargs</em> &#8211; The keyword arguments to pass on to the task (a <tt class="docutils literal"><span class="pre">dict</span></tt>)</li>
+<li><em>countdown</em> &#8211; Number of seconds into the future that the task should
+execute. Defaults to immediate delivery (Do not confuse that with
+the <tt class="docutils literal"><span class="pre">immediate</span></tt> setting, they are unrelated).</li>
+<li><em>eta</em> &#8211; A <tt class="xref docutils literal"><span class="pre">datetime.datetime</span></tt> object that describes the
+absolute time when the task should execute. May not be specified
+if <tt class="docutils literal"><span class="pre">countdown</span></tt> is also supplied. (Do not confuse this with the
+<tt class="docutils literal"><span class="pre">immediate</span></tt> setting, they are unrelated).</li>
+<li><em>routing_key</em> &#8211; The routing key used to route the task to a worker
+server.</li>
+<li><em>immediate</em> &#8211; Request immediate delivery. Will raise an exception
+if the task cannot be routed to a worker immediately.
+(Do not confuse this parameter with the <tt class="docutils literal"><span class="pre">countdown</span></tt> and <tt class="docutils literal"><span class="pre">eta</span></tt>
+settings, as they are unrelated).</li>
+<li><em>mandatory</em> &#8211; Mandatory routing. Raises an exception if there&#8217;s
+no running workers able to take on this task.</li>
+<li><em>connection</em> &#8211; Re-use existing AMQP connection.
+The <tt class="docutils literal"><span class="pre">connect_timeout</span></tt> argument is not respected if this is set.</li>
+<li><em>connect_timeout</em> &#8211; The timeout in seconds, before we give up
+on establishing a connection to the AMQP server.</li>
+<li><em>priority</em> &#8211; The task priority, a number between <tt class="docutils literal"><span class="pre">0</span></tt> and <tt class="docutils literal"><span class="pre">9</span></tt>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="function">
+<dt id="celery.execute.delay_task">
+<tt class="descclassname">celery.execute.</tt><tt class="descname">delay_task</tt><big>(</big><em>task_name</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.execute.delay_task" title="Permalink to this definition">¶</a></dt>
+<dd><p>Delay a task for execution by the <tt class="docutils literal"><span class="pre">celery</span></tt> daemon.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><em>task_name</em> &#8211; the name of a task registered in the task registry.</li>
+<li><em>*args</em> &#8211; positional arguments to pass on to the task.</li>
+<li><em>**kwargs</em> &#8211; keyword arguments to pass on to the task.</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name" colspan="2">Raises <a title="celery.registry.NotRegistered" class="reference external" href="celery.registry.html#celery.registry.NotRegistered">celery.registry.NotRegistered</a>:</th></tr>
+<tr><td>&nbsp;</td><td class="field-body"><p class="first">exception if no such task
+has been registered in the task registry.</p>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="celery.result.AsyncResult" class="reference external" href="celery.result.html#celery.result.AsyncResult"><tt class="xref docutils literal"><span class="pre">celery.result.AsyncResult</span></tt></a>.</p>
+</td>
+</tr>
+</tbody>
+</table>
+<p>Example</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">r</span> <span class="o">=</span> <span class="n">delay_task</span><span class="p">(</span><span class="s">&quot;update_record&quot;</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;George Constanza&quot;</span><span class="p">,</span> <span class="n">age</span><span class="o">=</span><span class="mf">32</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span><span class="o">.</span><span class="n">ready</span><span class="p">()</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span><span class="o">.</span><span class="n">result</span>
+<span class="go">&quot;Record was updated&quot;</span>
+</pre></div>
+</div>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.task.base.html"
+                                  title="previous chapter">Defining Tasks - celery.task.base</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.result.html"
+                                  title="next chapter">Task Result - celery.result</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.execute.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.result.html" title="Task Result - celery.result"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.task.base.html" title="Defining Tasks - celery.task.base"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 151 - 0
reference/celery.fields.html

@@ -0,0 +1,151 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Django Fields - celery.fields &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Celery Worker Daemon - celery.bin.celeryd" href="celery.bin.celeryd.html" />
+    <link rel="prev" title="Django Models - celery.models" href="celery.models.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.bin.celeryd.html" title="Celery Worker Daemon - celery.bin.celeryd"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.models.html" title="Django Models - celery.models"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.fields">
+<h1>Django Fields - celery.fields<a class="headerlink" href="#module-celery.fields" title="Permalink to this headline">¶</a></h1>
+<p>Custom Django Model Fields.</p>
+<dl class="class">
+<dt id="celery.fields.PickledObject">
+<em class="property">
+class </em><tt class="descclassname">celery.fields.</tt><tt class="descname">PickledObject</tt><a class="headerlink" href="#celery.fields.PickledObject" title="Permalink to this definition">¶</a></dt>
+<dd>A subclass of string so it can be told whether a string is
+a pickled object or not (if the object is an instance of this class
+then it must [well, should] be a pickled one).</dd></dl>
+
+<dl class="class">
+<dt id="celery.fields.PickledObjectField">
+<em class="property">
+class </em><tt class="descclassname">celery.fields.</tt><tt class="descname">PickledObjectField</tt><big>(</big><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class django.db.models.fields.NOT_PROVIDED at 0x20c0120&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em><big>)</big><a class="headerlink" href="#celery.fields.PickledObjectField" title="Permalink to this definition">¶</a></dt>
+<dd><p>A field that automatically pickles/unpickles its value.</p>
+<dl class="method">
+<dt id="celery.fields.PickledObjectField.get_db_prep_lookup">
+<tt class="descname">get_db_prep_lookup</tt><big>(</big><em>lookup_type</em>, <em>value</em><big>)</big><a class="headerlink" href="#celery.fields.PickledObjectField.get_db_prep_lookup" title="Permalink to this definition">¶</a></dt>
+<dd>get_db_prep_lookup</dd></dl>
+
+<dl class="method">
+<dt id="celery.fields.PickledObjectField.get_db_prep_save">
+<tt class="descname">get_db_prep_save</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#celery.fields.PickledObjectField.get_db_prep_save" title="Permalink to this definition">¶</a></dt>
+<dd>get_db_prep_save</dd></dl>
+
+<dl class="method">
+<dt id="celery.fields.PickledObjectField.get_internal_type">
+<tt class="descname">get_internal_type</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.fields.PickledObjectField.get_internal_type" title="Permalink to this definition">¶</a></dt>
+<dd>The database field type used by this field.</dd></dl>
+
+<dl class="method">
+<dt id="celery.fields.PickledObjectField.to_python">
+<tt class="descname">to_python</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#celery.fields.PickledObjectField.to_python" title="Permalink to this definition">¶</a></dt>
+<dd>Convert the database value to a python value.</dd></dl>
+
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.models.html"
+                                  title="previous chapter">Django Models - celery.models</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.bin.celeryd.html"
+                                  title="next chapter">Celery Worker Daemon - celery.bin.celeryd</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.fields.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.bin.celeryd.html" title="Celery Worker Daemon - celery.bin.celeryd"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.models.html" title="Django Models - celery.models"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 194 - 0
reference/celery.supervisor.html

@@ -0,0 +1,194 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Process Supervisor - celery.supervisor &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Backends - celery.backends" href="celery.backends.html" />
+    <link rel="prev" title="Task Pool - celery.pool" href="celery.pool.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.backends.html" title="Backends - celery.backends"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.pool.html" title="Task Pool - celery.pool"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.supervisor">
+<h1>Process Supervisor - celery.supervisor<a class="headerlink" href="#module-celery.supervisor" title="Permalink to this headline">¶</a></h1>
+<dl class="class">
+<dt id="celery.supervisor.OFASupervisor">
+<em class="property">
+class </em><tt class="descclassname">celery.supervisor.</tt><tt class="descname">OFASupervisor</tt><big>(</big><em>target</em>, <em>args=None</em>, <em>kwargs=None</em>, <em>ping_timeout=30</em>, <em>join_timeout=2</em>, <em>max_restart_freq=3</em>, <em>max_restart_freq_time=10</em>, <em>check_interval=2</em><big>)</big><a class="headerlink" href="#celery.supervisor.OFASupervisor" title="Permalink to this definition">¶</a></dt>
+<dd><p>Process supervisor using the <a class="reference external" href="http://erlang.org/doc/design_principles/sup_princ.html#5.3.2">one_for_all</a> strategy.</p>
+<p>However, instead of registering a list of processes, you have one
+process which runs a pool. Makes for an easy implementation.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>target</em> &#8211; see <a title="celery.supervisor.OFASupervisor.target" class="reference internal" href="#celery.supervisor.OFASupervisor.target"><tt class="xref docutils literal"><span class="pre">target</span></tt></a>.</li>
+<li><em>args</em> &#8211; see <a title="celery.supervisor.OFASupervisor.args" class="reference internal" href="#celery.supervisor.OFASupervisor.args"><tt class="xref docutils literal"><span class="pre">args</span></tt></a>.</li>
+<li><em>kwargs</em> &#8211; see <a title="celery.supervisor.OFASupervisor.kwargs" class="reference internal" href="#celery.supervisor.OFASupervisor.kwargs"><tt class="xref docutils literal"><span class="pre">kwargs</span></tt></a>.</li>
+<li><em>join_timeout</em> &#8211; see <a title="celery.supervisor.OFASupervisor.join_timeout" class="reference internal" href="#celery.supervisor.OFASupervisor.join_timeout"><tt class="xref docutils literal"><span class="pre">join_timeout</span></tt></a>.</li>
+<li><em>max_restart_freq</em> &#8211; see <a title="celery.supervisor.OFASupervisor.max_restart_freq" class="reference internal" href="#celery.supervisor.OFASupervisor.max_restart_freq"><tt class="xref docutils literal"><span class="pre">max_restart_freq</span></tt></a>.</li>
+<li><em>max_restart_freq_time</em> &#8211; see <a title="celery.supervisor.OFASupervisor.max_restart_freq_time" class="reference internal" href="#celery.supervisor.OFASupervisor.max_restart_freq_time"><tt class="xref docutils literal"><span class="pre">max_restart_freq_time</span></tt></a>.</li>
+<li><em>check_interval</em> &#8211; see <a title="celery.supervisor.OFASupervisor.max_restart_freq_time" class="reference internal" href="#celery.supervisor.OFASupervisor.max_restart_freq_time"><tt class="xref docutils literal"><span class="pre">max_restart_freq_time</span></tt></a>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.target">
+<tt class="descname">target</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.target" title="Permalink to this definition">¶</a></dt>
+<dd>The target callable to be launched in a new process.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.args">
+<tt class="descname">args</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.args" title="Permalink to this definition">¶</a></dt>
+<dd>The positional arguments to apply to <a title="celery.supervisor.OFASupervisor.target" class="reference internal" href="#celery.supervisor.OFASupervisor.target"><tt class="xref docutils literal"><span class="pre">target</span></tt></a>.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.kwargs">
+<tt class="descname">kwargs</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.kwargs" title="Permalink to this definition">¶</a></dt>
+<dd>The keyword arguments to apply to <a title="celery.supervisor.OFASupervisor.target" class="reference internal" href="#celery.supervisor.OFASupervisor.target"><tt class="xref docutils literal"><span class="pre">target</span></tt></a>.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.join_timeout">
+<tt class="descname">join_timeout</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.join_timeout" title="Permalink to this definition">¶</a></dt>
+<dd>If the process is dead, try to give it a few seconds to join.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.max_restart_freq">
+<tt class="descname">max_restart_freq</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.max_restart_freq" title="Permalink to this definition">¶</a></dt>
+<dd><p>Limit the number of restarts which can occur in a given time interval.</p>
+<p>The max restart frequency is the number of restarts that can occur
+within the interval <a title="celery.supervisor.OFASupervisor.max_restart_freq_time" class="reference internal" href="#celery.supervisor.OFASupervisor.max_restart_freq_time"><tt class="xref docutils literal"><span class="pre">max_restart_freq_time</span></tt></a>.</p>
+<p>The restart mechanism prevents situations where the process repeatedly
+dies for the same reason. If this happens both the process and the
+supervisor is terminated.</p>
+</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.max_restart_freq_time">
+<tt class="descname">max_restart_freq_time</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.max_restart_freq_time" title="Permalink to this definition">¶</a></dt>
+<dd>See <a title="celery.supervisor.OFASupervisor.max_restart_freq" class="reference internal" href="#celery.supervisor.OFASupervisor.max_restart_freq"><tt class="xref docutils literal"><span class="pre">max_restart_freq</span></tt></a>.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.supervisor.OFASupervisor.check_interval">
+<tt class="descname">check_interval</tt><a class="headerlink" href="#celery.supervisor.OFASupervisor.check_interval" title="Permalink to this definition">¶</a></dt>
+<dd>The time in seconds, between process pings.</dd></dl>
+
+<dl class="method">
+<dt id="celery.supervisor.OFASupervisor.start">
+<tt class="descname">start</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.supervisor.OFASupervisor.start" title="Permalink to this definition">¶</a></dt>
+<dd>Launches the <a title="celery.supervisor.OFASupervisor.target" class="reference internal" href="#celery.supervisor.OFASupervisor.target"><tt class="xref docutils literal"><span class="pre">target</span></tt></a> in a seperate process and starts
+supervising it.</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="celery.supervisor.raise_ping_timeout">
+<tt class="descclassname">celery.supervisor.</tt><tt class="descname">raise_ping_timeout</tt><big>(</big><em>msg</em><big>)</big><a class="headerlink" href="#celery.supervisor.raise_ping_timeout" title="Permalink to this definition">¶</a></dt>
+<dd>Raises <tt class="xref docutils literal"><span class="pre">multiprocessing.TimeoutError</span></tt>, for use in
+<tt class="xref docutils literal"><span class="pre">threading.Timer</span></tt> callbacks.</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.pool.html"
+                                  title="previous chapter">Task Pool - celery.pool</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.backends.html"
+                                  title="next chapter">Backends - celery.backends</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.supervisor.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.backends.html" title="Backends - celery.backends"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.pool.html" title="Task Pool - celery.pool"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 527 - 0
reference/celery.task.base.html

@@ -0,0 +1,527 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Defining Tasks - celery.task.base &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Executing Tasks - celery.execute" href="celery.execute.html" />
+    <link rel="prev" title="Module API Reference" href="index.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.execute.html" title="Executing Tasks - celery.execute"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="Module API Reference"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.task.base">
+<h1>Defining Tasks - celery.task.base<a class="headerlink" href="#module-celery.task.base" title="Permalink to this headline">¶</a></h1>
+<dl class="class">
+<dt id="celery.task.base.PeriodicTask">
+<em class="property">
+class </em><tt class="descclassname">celery.task.base.</tt><tt class="descname">PeriodicTask</tt><a class="headerlink" href="#celery.task.base.PeriodicTask" title="Permalink to this definition">¶</a></dt>
+<dd><p>A periodic task is a task that behaves like a <em>cron</em> job.</p>
+<dl class="attribute">
+<dt id="celery.task.base.PeriodicTask.run_every">
+<tt class="descname">run_every</tt><a class="headerlink" href="#celery.task.base.PeriodicTask.run_every" title="Permalink to this definition">¶</a></dt>
+<dd><em>REQUIRED</em> Defines how often the task is run (its interval),
+it can be either a <tt class="xref docutils literal"><span class="pre">datetime.timedelta</span></tt> object or an
+integer specifying the time in seconds.</dd></dl>
+
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr>
+<tr><td>&nbsp;</td><td class="field-body">if the <a title="celery.task.base.PeriodicTask.run_every" class="reference internal" href="#celery.task.base.PeriodicTask.run_every"><tt class="xref docutils literal"><span class="pre">run_every</span></tt></a> attribute is
+not defined.</td>
+</tr>
+</tbody>
+</table>
+<p>You have to register the periodic task in the task registry.</p>
+<p>Example</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">tasks</span><span class="p">,</span> <span class="n">PeriodicTask</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">timedelta</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">MyPeriodicTask</span><span class="p">(</span><span class="n">PeriodicTask</span><span class="p">):</span>
+<span class="gp">... </span>    <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;my_periodic_task&quot;</span>
+<span class="gp">... </span>    <span class="n">run_every</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">seconds</span><span class="o">=</span><span class="mf">30</span><span class="p">)</span>
+<span class="gp">...</span>
+<span class="gp">... </span>    <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+<span class="gp">... </span>        <span class="n">logger</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_logger</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+<span class="gp">... </span>        <span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;Running MyPeriodicTask&quot;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">tasks</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">MyPeriodicTask</span><span class="p">)</span>
+</pre></div>
+</div>
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.task.base.Task">
+<em class="property">
+class </em><tt class="descclassname">celery.task.base.</tt><tt class="descname">Task</tt><a class="headerlink" href="#celery.task.base.Task" title="Permalink to this definition">¶</a></dt>
+<dd><p>A task that can be delayed for execution by the <tt class="docutils literal"><span class="pre">celery</span></tt> daemon.</p>
+<p>All subclasses of <a title="celery.task.base.Task" class="reference internal" href="#celery.task.base.Task"><tt class="xref docutils literal"><span class="pre">Task</span></tt></a> must define the <a title="celery.task.base.Task.run" class="reference internal" href="#celery.task.base.Task.run"><tt class="xref docutils literal"><span class="pre">run()</span></tt></a> method,
+which is the actual method the <tt class="docutils literal"><span class="pre">celery</span></tt> daemon executes.</p>
+<p>The <a title="celery.task.base.Task.run" class="reference internal" href="#celery.task.base.Task.run"><tt class="xref docutils literal"><span class="pre">run()</span></tt></a> method supports both positional, and keyword arguments.</p>
+<dl class="attribute">
+<dt id="celery.task.base.Task.name">
+<tt class="descname">name</tt><a class="headerlink" href="#celery.task.base.Task.name" title="Permalink to this definition">¶</a></dt>
+<dd><em>REQUIRED</em> All subclasses of <a title="celery.task.base.Task" class="reference internal" href="#celery.task.base.Task"><tt class="xref docutils literal"><span class="pre">Task</span></tt></a> has to define the
+<a title="celery.task.base.Task.name" class="reference internal" href="#celery.task.base.Task.name"><tt class="xref docutils literal"><span class="pre">name</span></tt></a> attribute. This is the name of the task, registered
+in the task registry, and passed to <tt class="xref docutils literal"><span class="pre">delay_task()</span></tt>.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.Task.type">
+<tt class="descname">type</tt><a class="headerlink" href="#celery.task.base.Task.type" title="Permalink to this definition">¶</a></dt>
+<dd>The type of task, currently this can be <tt class="docutils literal"><span class="pre">regular</span></tt>, or <tt class="docutils literal"><span class="pre">periodic</span></tt>,
+however if you want a periodic task, you should subclass
+<a title="celery.task.base.PeriodicTask" class="reference internal" href="#celery.task.base.PeriodicTask"><tt class="xref docutils literal"><span class="pre">PeriodicTask</span></tt></a> instead.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.Task.routing_key">
+<tt class="descname">routing_key</tt><a class="headerlink" href="#celery.task.base.Task.routing_key" title="Permalink to this definition">¶</a></dt>
+<dd>Override the global default <tt class="docutils literal"><span class="pre">routing_key</span></tt> for this task.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.Task.mandatory">
+<tt class="descname">mandatory</tt><a class="headerlink" href="#celery.task.base.Task.mandatory" title="Permalink to this definition">¶</a></dt>
+<dd>If set, the message has mandatory routing. By default the message
+is silently dropped by the broker if it can&#8217;t be routed to a queue.
+However - If the message is mandatory, an exception will be raised
+instead.</dd></dl>
+
+<dl class="attribute">
+<dt>
+<tt class="descname">immediate:</tt></dt>
+<dd>Request immediate delivery. If the message cannot be routed to a
+task worker immediately, an exception will be raised. This is
+instead of the default behaviour, where the broker will accept and
+queue the message, but with no guarantee that the message will ever
+be consumed.</dd></dl>
+
+<dl class="attribute">
+<dt>
+<tt class="descname">priority:</tt></dt>
+<dd>The message priority. A number from <tt class="docutils literal"><span class="pre">0</span></tt> to <tt class="docutils literal"><span class="pre">9</span></tt>.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.Task.ignore_result">
+<tt class="descname">ignore_result</tt><a class="headerlink" href="#celery.task.base.Task.ignore_result" title="Permalink to this definition">¶</a></dt>
+<dd>Don&#8217;t store the status and return value. This means you can&#8217;t
+use the <a title="celery.result.AsyncResult" class="reference external" href="celery.result.html#celery.result.AsyncResult"><tt class="xref docutils literal"><span class="pre">celery.result.AsyncResult</span></tt></a> to check if the task is
+done, or get its return value. Only use if you need the performance
+and is able live without these features. Any exceptions raised will
+store the return value/status as usual.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.Task.disable_error_emails">
+<tt class="descname">disable_error_emails</tt><a class="headerlink" href="#celery.task.base.Task.disable_error_emails" title="Permalink to this definition">¶</a></dt>
+<dd>Disable all error e-mails for this task (only applicable if
+<tt class="docutils literal"><span class="pre">settings.SEND_CELERY_ERROR_EMAILS</span></tt> is on.)</dd></dl>
+
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr>
+<tr><td>&nbsp;</td><td class="field-body">if the <a title="celery.task.base.Task.name" class="reference internal" href="#celery.task.base.Task.name"><tt class="xref docutils literal"><span class="pre">name</span></tt></a> attribute is not set.</td>
+</tr>
+</tbody>
+</table>
+<p>The resulting class is callable, which if called will apply the
+<a title="celery.task.base.Task.run" class="reference internal" href="#celery.task.base.Task.run"><tt class="xref docutils literal"><span class="pre">run()</span></tt></a> method.</p>
+<p>Examples</p>
+<p>This is a simple task just logging a message,</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">tasks</span><span class="p">,</span> <span class="n">Task</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">MyTask</span><span class="p">(</span><span class="n">Task</span><span class="p">):</span>
+<span class="gp">... </span>    <span class="n">name</span> <span class="o">=</span> <span class="s">&quot;mytask&quot;</span>
+<span class="gp">...</span>
+<span class="gp">... </span>    <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">some_arg</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+<span class="gp">... </span>        <span class="n">logger</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_logger</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+<span class="gp">... </span>        <span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&quot;Running MyTask with arg some_arg=</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span>
+<span class="gp">... </span>                    <span class="n">some_arg</span><span class="p">))</span>
+<span class="gp">... </span>        <span class="k">return</span> <span class="mf">42</span>
+<span class="gp">... </span><span class="n">tasks</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">MyTask</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>You can delay the task using the classmethod <a title="celery.task.base.Task.delay" class="reference internal" href="#celery.task.base.Task.delay"><tt class="xref docutils literal"><span class="pre">delay()</span></tt></a>...</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">MyTask</span><span class="o">.</span><span class="n">delay</span><span class="p">(</span><span class="n">some_arg</span><span class="o">=</span><span class="s">&quot;foo&quot;</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">status</span> <span class="c"># after some time</span>
+<span class="go">&#39;DONE&#39;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">result</span>
+<span class="go">42</span>
+</pre></div>
+</div>
+<p>...or using the <tt class="xref docutils literal"><span class="pre">delay_task()</span></tt> function, by passing the name of
+the task.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">delay_task</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">delay_task</span><span class="p">(</span><span class="n">MyTask</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">some_arg</span><span class="o">=</span><span class="s">&quot;foo&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<dl class="classmethod">
+<dt id="celery.task.base.Task.apply_async">
+<em class="property">
+classmethod </em><tt class="descname">apply_async</tt><big>(</big><em>args=None</em>, <em>kwargs=None</em>, <em>**options</em><big>)</big><a class="headerlink" href="#celery.task.base.Task.apply_async" title="Permalink to this definition">¶</a></dt>
+<dd><p>Delay this task for execution by the <tt class="docutils literal"><span class="pre">celery</span></tt> daemon(s).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><em>args</em> &#8211; positional arguments passed on to the task.</li>
+<li><em>kwargs</em> &#8211; keyword arguments passed on to the task.</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="celery.result.AsyncResult" class="reference external" href="celery.result.html#celery.result.AsyncResult"><tt class="xref docutils literal"><span class="pre">celery.result.AsyncResult</span></tt></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+<p>See <a title="celery.task.base.Task.apply_async" class="reference internal" href="#celery.task.base.Task.apply_async"><tt class="xref docutils literal"><span class="pre">apply_async()</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="classmethod">
+<dt id="celery.task.base.Task.delay">
+<em class="property">
+classmethod </em><tt class="descname">delay</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.base.Task.delay" title="Permalink to this definition">¶</a></dt>
+<dd><p>Delay this task for execution by the <tt class="docutils literal"><span class="pre">celery</span></tt> daemon(s).</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><em>*args</em> &#8211; positional arguments passed on to the task.</li>
+<li><em>**kwargs</em> &#8211; keyword arguments passed on to the task.</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="celery.result.AsyncResult" class="reference external" href="celery.result.html#celery.result.AsyncResult"><tt class="xref docutils literal"><span class="pre">celery.result.AsyncResult</span></tt></a></p>
+</td>
+</tr>
+</tbody>
+</table>
+<p>See <tt class="xref docutils literal"><span class="pre">delay_task()</span></tt>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.task.base.Task.get_consumer">
+<tt class="descname">get_consumer</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.task.base.Task.get_consumer" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get a celery task message consumer.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="celery.messaging.TaskConsumer" class="reference external" href="celery.messaging.html#celery.messaging.TaskConsumer"><tt class="xref docutils literal"><span class="pre">celery.messaging.TaskConsumer</span></tt></a>.</td>
+</tr>
+</tbody>
+</table>
+<p>Please be sure to close the AMQP connection when you&#8217;re done
+with this object. i.e.:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">consumer</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_consumer</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="c"># do something with consumer</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">consumer</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+</pre></div>
+</div>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.task.base.Task.get_logger">
+<tt class="descname">get_logger</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.base.Task.get_logger" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get process-aware logger object.</p>
+<p>See <a title="celery.log.setup_logger" class="reference external" href="celery.log.html#celery.log.setup_logger"><tt class="xref docutils literal"><span class="pre">celery.log.setup_logger()</span></tt></a>.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.task.base.Task.get_publisher">
+<tt class="descname">get_publisher</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.task.base.Task.get_publisher" title="Permalink to this definition">¶</a></dt>
+<dd><p>Get a celery task message publisher.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="celery.messaging.TaskPublisher" class="reference external" href="celery.messaging.html#celery.messaging.TaskPublisher"><tt class="xref docutils literal"><span class="pre">celery.messaging.TaskPublisher</span></tt></a>.</td>
+</tr>
+</tbody>
+</table>
+<p>Please be sure to close the AMQP connection when you&#8217;re done
+with this object, i.e.:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">publisher</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_publisher</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="c"># do something with publisher</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">publisher</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+</pre></div>
+</div>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.task.base.Task.run">
+<tt class="descname">run</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.base.Task.run" title="Permalink to this definition">¶</a></dt>
+<dd><p><em>REQUIRED</em> The actual task.</p>
+<p>All subclasses of <a title="celery.task.base.Task" class="reference internal" href="#celery.task.base.Task"><tt class="xref docutils literal"><span class="pre">Task</span></tt></a> must define the run method.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr>
+<tr><td>&nbsp;</td><td class="field-body">by default, so you have to override
+this method in your subclass.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.task.base.TaskSet">
+<em class="property">
+class </em><tt class="descclassname">celery.task.base.</tt><tt class="descname">TaskSet</tt><big>(</big><em>task</em>, <em>args</em><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet" title="Permalink to this definition">¶</a></dt>
+<dd><p>A task containing several subtasks, making it possible
+to track how many, or when all of the tasks has been completed.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>task</em> &#8211; The task class or name.
+Can either be a fully qualified task name, or a task class.</li>
+<li><em>args</em> &#8211; A list of args, kwargs pairs.
+e.g. <tt class="docutils literal"><span class="pre">[[args1,</span> <span class="pre">kwargs1],</span> <span class="pre">[args2,</span> <span class="pre">kwargs2],</span> <span class="pre">...,</span> <span class="pre">[argsN,</span> <span class="pre">kwargsN]]</span></tt></li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="attribute">
+<dt id="celery.task.base.TaskSet.task_name">
+<tt class="descname">task_name</tt><a class="headerlink" href="#celery.task.base.TaskSet.task_name" title="Permalink to this definition">¶</a></dt>
+<dd>The name of the task.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.TaskSet.arguments">
+<tt class="descname">arguments</tt><a class="headerlink" href="#celery.task.base.TaskSet.arguments" title="Permalink to this definition">¶</a></dt>
+<dd>The arguments, as passed to the task set constructor.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.task.base.TaskSet.total">
+<tt class="descname">total</tt><a class="headerlink" href="#celery.task.base.TaskSet.total" title="Permalink to this definition">¶</a></dt>
+<dd>Total number of tasks in this task set.</dd></dl>
+
+<p>Example</p>
+<blockquote>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">djangofeeds.tasks</span> <span class="kn">import</span> <span class="n">RefreshFeedTask</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">taskset</span> <span class="o">=</span> <span class="n">TaskSet</span><span class="p">(</span><span class="n">RefreshFeedTask</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">[</span>
+<span class="gp">... </span>                <span class="p">[],</span> <span class="p">{</span><span class="s">&quot;feed_url&quot;</span><span class="p">:</span> <span class="s">&quot;http://cnn.com/rss&quot;</span><span class="p">},</span>
+<span class="gp">... </span>                <span class="p">[],</span> <span class="p">{</span><span class="s">&quot;feed_url&quot;</span><span class="p">:</span> <span class="s">&quot;http://bbc.com/rss&quot;</span><span class="p">},</span>
+<span class="gp">... </span>                <span class="p">[],</span> <span class="p">{</span><span class="s">&quot;feed_url&quot;</span><span class="p">:</span> <span class="s">&quot;http://xkcd.com/rss&quot;</span><span class="p">}])</span>
+</pre></div>
+</div>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">taskset_result</span> <span class="o">=</span> <span class="n">taskset</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">list_of_return_values</span> <span class="o">=</span> <span class="n">taskset</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
+</pre></div>
+</div>
+</blockquote>
+<dl class="method">
+<dt id="celery.task.base.TaskSet.iterate">
+<tt class="descname">iterate</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet.iterate" title="Permalink to this definition">¶</a></dt>
+<dd><p>Iterate over the results returned after calling <a title="celery.task.base.TaskSet.run" class="reference internal" href="#celery.task.base.TaskSet.run"><tt class="xref docutils literal"><span class="pre">run()</span></tt></a>.</p>
+<p>If any of the tasks raises an exception, the exception will
+be re-raised.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.task.base.TaskSet.join">
+<tt class="descname">join</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet.join" title="Permalink to this definition">¶</a></dt>
+<dd><p>Gather the results for all of the tasks in the taskset,
+and return a list with them ordered by the order of which they
+were called.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>timeout</em> &#8211; The time in seconds, how long
+it will wait for results, before the operation times out.</td>
+</tr>
+<tr class="field"><th class="field-name" colspan="2">Raises TimeoutError:</th></tr>
+<tr><td>&nbsp;</td><td class="field-body">if <tt class="docutils literal"><span class="pre">timeout</span></tt> is not <tt class="xref docutils literal"><span class="pre">None</span></tt>
+and the operation takes longer than <tt class="docutils literal"><span class="pre">timeout</span></tt> seconds.</td>
+</tr>
+</tbody>
+</table>
+<p>If any of the tasks raises an exception, the exception
+will be reraised by <a title="celery.task.base.TaskSet.join" class="reference internal" href="#celery.task.base.TaskSet.join"><tt class="xref docutils literal"><span class="pre">join()</span></tt></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body">list of return values for all tasks in the taskset.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="classmethod">
+<dt id="celery.task.base.TaskSet.map">
+<em class="property">
+classmethod </em><tt class="descname">map</tt><big>(</big><em>func</em>, <em>args</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet.map" title="Permalink to this definition">¶</a></dt>
+<dd>Distribute processing of the arguments and collect the results.</dd></dl>
+
+<dl class="classmethod">
+<dt id="celery.task.base.TaskSet.map_async">
+<em class="property">
+classmethod </em><tt class="descname">map_async</tt><big>(</big><em>func</em>, <em>args</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet.map_async" title="Permalink to this definition">¶</a></dt>
+<dd><p>Distribute processing of the arguments and collect the results
+asynchronously.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><a title="celery.result.AsyncResult" class="reference external" href="celery.result.html#celery.result.AsyncResult"><tt class="xref docutils literal"><span class="pre">celery.result.AsyncResult</span></tt></a> instance.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="classmethod">
+<dt id="celery.task.base.TaskSet.remote_execute">
+<em class="property">
+classmethod </em><tt class="descname">remote_execute</tt><big>(</big><em>func</em>, <em>args</em><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet.remote_execute" title="Permalink to this definition">¶</a></dt>
+<dd>Apply <tt class="docutils literal"><span class="pre">args</span></tt> to function by distributing the args to the
+celery server(s).</dd></dl>
+
+<dl class="method">
+<dt id="celery.task.base.TaskSet.run">
+<tt class="descname">run</tt><big>(</big><em>connect_timeout=4</em><big>)</big><a class="headerlink" href="#celery.task.base.TaskSet.run" title="Permalink to this definition">¶</a></dt>
+<dd><p>Run all tasks in the taskset.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body">A <a title="celery.result.TaskSetResult" class="reference external" href="celery.result.html#celery.result.TaskSetResult"><tt class="xref docutils literal"><span class="pre">celery.result.TaskSetResult</span></tt></a> instance.</td>
+</tr>
+</tbody>
+</table>
+<p>Example</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">ts</span> <span class="o">=</span> <span class="n">TaskSet</span><span class="p">(</span><span class="n">RefreshFeedTask</span><span class="p">,</span> <span class="p">[</span>
+<span class="gp">... </span>        <span class="p">[</span><span class="s">&quot;http://foo.com/rss&quot;</span><span class="p">,</span> <span class="p">{}],</span>
+<span class="gp">... </span>        <span class="p">[</span><span class="s">&quot;http://bar.com/rss&quot;</span><span class="p">,</span> <span class="p">{}],</span>
+<span class="gp">... </span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">ts</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">taskset_id</span>
+<span class="go">&quot;d2c9b261-8eff-4bfb-8459-1e1b72063514&quot;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">subtask_ids</span>
+<span class="go">[&quot;b4996460-d959-49c8-aeb9-39c530dcde25&quot;,</span>
+<span class="go">&quot;598d2d18-ab86-45ca-8b4f-0779f5d6a3cb&quot;]</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">waiting</span><span class="p">()</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">10</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">ready</span><span class="p">()</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">successful</span><span class="p">()</span>
+<span class="go">True</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">failed</span><span class="p">()</span>
+<span class="go">False</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
+<span class="go">[True, True]</span>
+</pre></div>
+</div>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="index.html"
+                                  title="previous chapter">Module API Reference</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.execute.html"
+                                  title="next chapter">Executing Tasks - celery.execute</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.task.base.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.execute.html" title="Executing Tasks - celery.execute"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="index.html" title="Module API Reference"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 191 - 0
reference/celery.task.builtins.html

@@ -0,0 +1,191 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Built-in Task Classes - celery.task.builtins &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Task Discovery - celery.discovery" href="celery.discovery.html" />
+    <link rel="prev" title="Task Registry - celery.registry" href="celery.registry.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.discovery.html" title="Task Discovery - celery.discovery"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.registry.html" title="Task Registry - celery.registry"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.task.builtins">
+<h1>Built-in Task Classes - celery.task.builtins<a class="headerlink" href="#module-celery.task.builtins" title="Permalink to this headline">¶</a></h1>
+<dl class="class">
+<dt id="celery.task.builtins.AsynchronousMapTask">
+<em class="property">
+class </em><tt class="descclassname">celery.task.builtins.</tt><tt class="descname">AsynchronousMapTask</tt><a class="headerlink" href="#celery.task.builtins.AsynchronousMapTask" title="Permalink to this definition">¶</a></dt>
+<dd><p>Task used internally by <tt class="xref docutils literal"><span class="pre">dmap_async()</span></tt> and
+<tt class="xref docutils literal"><span class="pre">TaskSet.map_async()</span></tt>.</p>
+<dl class="method">
+<dt id="celery.task.builtins.AsynchronousMapTask.run">
+<tt class="descname">run</tt><big>(</big><em>serfunc</em>, <em>args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.builtins.AsynchronousMapTask.run" title="Permalink to this definition">¶</a></dt>
+<dd>The method run by <tt class="docutils literal"><span class="pre">celeryd</span></tt>.</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.task.builtins.DeleteExpiredTaskMetaTask">
+<em class="property">
+class </em><tt class="descclassname">celery.task.builtins.</tt><tt class="descname">DeleteExpiredTaskMetaTask</tt><a class="headerlink" href="#celery.task.builtins.DeleteExpiredTaskMetaTask" title="Permalink to this definition">¶</a></dt>
+<dd><p>A periodic task that deletes expired task metadata every day.</p>
+<p>This runs the current backend&#8217;s
+<a title="celery.backends.base.BaseBackend.cleanup" class="reference external" href="celery.backends.base.html#celery.backends.base.BaseBackend.cleanup"><tt class="xref docutils literal"><span class="pre">celery.backends.base.BaseBackend.cleanup()</span></tt></a> method.</p>
+<dl class="method">
+<dt id="celery.task.builtins.DeleteExpiredTaskMetaTask.run">
+<tt class="descname">run</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.builtins.DeleteExpiredTaskMetaTask.run" title="Permalink to this definition">¶</a></dt>
+<dd>The method run by <tt class="docutils literal"><span class="pre">celeryd</span></tt>.</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.task.builtins.ExecuteRemoteTask">
+<em class="property">
+class </em><tt class="descclassname">celery.task.builtins.</tt><tt class="descname">ExecuteRemoteTask</tt><a class="headerlink" href="#celery.task.builtins.ExecuteRemoteTask" title="Permalink to this definition">¶</a></dt>
+<dd><p>Execute an arbitrary function or object.</p>
+<p><em>Note</em> You probably want <tt class="xref docutils literal"><span class="pre">execute_remote()</span></tt> instead, which this
+is an internal component of.</p>
+<p>The object must be pickleable, so you can&#8217;t use lambdas or functions
+defined in the REPL (that is the python shell, or <tt class="docutils literal"><span class="pre">ipython</span></tt>).</p>
+<dl class="method">
+<dt id="celery.task.builtins.ExecuteRemoteTask.run">
+<tt class="descname">run</tt><big>(</big><em>ser_callable</em>, <em>fargs</em>, <em>fkwargs</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.builtins.ExecuteRemoteTask.run" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>ser_callable</em> &#8211; A pickled function or callable object.</li>
+<li><em>fargs</em> &#8211; Positional arguments to apply to the function.</li>
+<li><em>fkwargs</em> &#8211; Keyword arguments to apply to the function.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.task.builtins.PingTask">
+<em class="property">
+class </em><tt class="descclassname">celery.task.builtins.</tt><tt class="descname">PingTask</tt><a class="headerlink" href="#celery.task.builtins.PingTask" title="Permalink to this definition">¶</a></dt>
+<dd><p>The task used by <tt class="xref docutils literal"><span class="pre">ping()</span></tt>.</p>
+<dl class="method">
+<dt id="celery.task.builtins.PingTask.run">
+<tt class="descname">run</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.task.builtins.PingTask.run" title="Permalink to this definition">¶</a></dt>
+<dd><table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the string <tt class="docutils literal"><span class="pre">&quot;pong&quot;</span></tt>.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.registry.html"
+                                  title="previous chapter">Task Registry - celery.registry</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.discovery.html"
+                                  title="next chapter">Task Discovery - celery.discovery</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.task.builtins.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.discovery.html" title="Task Discovery - celery.discovery"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.registry.html" title="Task Registry - celery.registry"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 133 - 0
reference/celery.utils.html

@@ -0,0 +1,133 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Multiprocessing Worker - celery.worker &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Django Views - celery.views" href="celery.views.html" />
+    <link rel="prev" title="Logging - celery.log" href="celery.log.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.views.html" title="Django Views - celery.views"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.log.html" title="Logging - celery.log"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.utils">
+<h1>Multiprocessing Worker - celery.worker<a class="headerlink" href="#module-celery.utils" title="Permalink to this headline">¶</a></h1>
+<p>Utility functions</p>
+<dl class="function">
+<dt id="celery.utils.chunks">
+<tt class="descclassname">celery.utils.</tt><tt class="descname">chunks</tt><big>(</big><em>it</em>, <em>n</em><big>)</big><a class="headerlink" href="#celery.utils.chunks" title="Permalink to this definition">¶</a></dt>
+<dd><p>Split an iterator into chunks with <tt class="docutils literal"><span class="pre">n</span></tt> elements each.</p>
+<p>Examples</p>
+<blockquote>
+<p># n == 2
+&gt;&gt;&gt; x = chunks(iter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 2)
+&gt;&gt;&gt; list(x)
+[[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10]]</p>
+<p># n == 3
+&gt;&gt;&gt; x = chunks(iter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 3)
+&gt;&gt;&gt; list(x)
+[[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10]]</p>
+</blockquote>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.log.html"
+                                  title="previous chapter">Logging - celery.log</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.views.html"
+                                  title="next chapter">Django Views - celery.views</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.utils.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.views.html" title="Django Views - celery.views"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.log.html" title="Logging - celery.log"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 138 - 0
reference/celery.views.html

@@ -0,0 +1,138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Django Views - celery.views &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Django Model Managers - celery.managers" href="celery.managers.html" />
+    <link rel="prev" title="Multiprocessing Worker - celery.worker" href="celery.utils.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.managers.html" title="Django Model Managers - celery.managers"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.utils.html" title="Multiprocessing Worker - celery.worker"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.views">
+<h1>Django Views - celery.views<a class="headerlink" href="#module-celery.views" title="Permalink to this headline">¶</a></h1>
+<p>celery.views</p>
+<dl class="function">
+<dt id="celery.views.apply">
+<tt class="descclassname">celery.views.</tt><tt class="descname">apply</tt><big>(</big><em>request</em>, <em>task_name</em>, <em>*args</em><big>)</big><a class="headerlink" href="#celery.views.apply" title="Permalink to this definition">¶</a></dt>
+<dd><p>View applying a task.</p>
+<dl class="docutils">
+<dt>Example:</dt>
+<dd><a class="reference external" href="http://e.com/celery/apply/task_name/arg1/arg2//?kwarg1=a&amp;kwarg2=b">http://e.com/celery/apply/task_name/arg1/arg2//?kwarg1=a&amp;kwarg2=b</a></dd>
+</dl>
+<p><strong>NOTE</strong> Use with caution, preferably not make this publicly accessible
+without ensuring your code is safe!</p>
+</dd></dl>
+
+<dl class="function">
+<dt id="celery.views.is_task_done">
+<tt class="descclassname">celery.views.</tt><tt class="descname">is_task_done</tt><big>(</big><em>request</em>, <em>task_id</em><big>)</big><a class="headerlink" href="#celery.views.is_task_done" title="Permalink to this definition">¶</a></dt>
+<dd>Returns task execute status in JSON format.</dd></dl>
+
+<dl class="function">
+<dt id="celery.views.task_status">
+<tt class="descclassname">celery.views.</tt><tt class="descname">task_status</tt><big>(</big><em>request</em>, <em>task_id</em><big>)</big><a class="headerlink" href="#celery.views.task_status" title="Permalink to this definition">¶</a></dt>
+<dd>Returns task status and result in JSON format.</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.utils.html"
+                                  title="previous chapter">Multiprocessing Worker - celery.worker</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.managers.html"
+                                  title="next chapter">Django Model Managers - celery.managers</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.views.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.managers.html" title="Django Model Managers - celery.managers"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.utils.html" title="Multiprocessing Worker - celery.worker"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 180 - 0
reference/celery.worker.controllers.html

@@ -0,0 +1,180 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Worker Controller Threads - celery.worker.controllers &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Task Pool - celery.pool" href="celery.pool.html" />
+    <link rel="prev" title="Executable Jobs - celery.worker.job" href="celery.worker.job.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.pool.html" title="Task Pool - celery.pool"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.worker.job.html" title="Executable Jobs - celery.worker.job"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.worker.controllers">
+<h1>Worker Controller Threads - celery.worker.controllers<a class="headerlink" href="#module-celery.worker.controllers" title="Permalink to this headline">¶</a></h1>
+<p>Worker Controller Threads</p>
+<dl class="class">
+<dt id="celery.worker.controllers.InfinityThread">
+<em class="property">
+class </em><tt class="descclassname">celery.worker.controllers.</tt><tt class="descname">InfinityThread</tt><a class="headerlink" href="#celery.worker.controllers.InfinityThread" title="Permalink to this definition">¶</a></dt>
+<dd><p>Thread running an infinite loop which for every iteration
+calls its <a title="celery.worker.controllers.InfinityThread.on_iteration" class="reference internal" href="#celery.worker.controllers.InfinityThread.on_iteration"><tt class="xref docutils literal"><span class="pre">on_iteration()</span></tt></a> method.</p>
+<p>This also implements graceful shutdown of the thread by providing
+the <a title="celery.worker.controllers.InfinityThread.stop" class="reference internal" href="#celery.worker.controllers.InfinityThread.stop"><tt class="xref docutils literal"><span class="pre">stop()</span></tt></a> method.</p>
+<dl class="method">
+<dt id="celery.worker.controllers.InfinityThread.on_iteration">
+<tt class="descname">on_iteration</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.controllers.InfinityThread.on_iteration" title="Permalink to this definition">¶</a></dt>
+<dd>This is the method called for every iteration and must be
+implemented by every subclass of <a title="celery.worker.controllers.InfinityThread" class="reference internal" href="#celery.worker.controllers.InfinityThread"><tt class="xref docutils literal"><span class="pre">InfinityThread</span></tt></a>.</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.controllers.InfinityThread.run">
+<tt class="descname">run</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.controllers.InfinityThread.run" title="Permalink to this definition">¶</a></dt>
+<dd><p>This is the body of the thread.</p>
+<p>To start the thread use <tt class="xref docutils literal"><span class="pre">start()</span></tt> instead.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.controllers.InfinityThread.stop">
+<tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.controllers.InfinityThread.stop" title="Permalink to this definition">¶</a></dt>
+<dd>Gracefully shutdown the thread.</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.worker.controllers.Mediator">
+<em class="property">
+class </em><tt class="descclassname">celery.worker.controllers.</tt><tt class="descname">Mediator</tt><big>(</big><em>bucket_queue</em>, <em>callback</em><big>)</big><a class="headerlink" href="#celery.worker.controllers.Mediator" title="Permalink to this definition">¶</a></dt>
+<dd><p>Thread continuously sending tasks in the queue to the pool.</p>
+<dl class="attribute">
+<dt id="celery.worker.controllers.Mediator.bucket_queue">
+<tt class="descname">bucket_queue</tt><a class="headerlink" href="#celery.worker.controllers.Mediator.bucket_queue" title="Permalink to this definition">¶</a></dt>
+<dd>The task queue, a <tt class="xref docutils literal"><span class="pre">Queue.Queue</span></tt> instance.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.worker.controllers.Mediator.callback">
+<tt class="descname">callback</tt><a class="headerlink" href="#celery.worker.controllers.Mediator.callback" title="Permalink to this definition">¶</a></dt>
+<dd>The callback used to process tasks retrieved from the
+<a title="celery.worker.controllers.Mediator.bucket_queue" class="reference internal" href="#celery.worker.controllers.Mediator.bucket_queue"><tt class="xref docutils literal"><span class="pre">bucket_queue</span></tt></a>.</dd></dl>
+
+</dd></dl>
+
+<dl class="class">
+<dt id="celery.worker.controllers.PeriodicWorkController">
+<em class="property">
+class </em><tt class="descclassname">celery.worker.controllers.</tt><tt class="descname">PeriodicWorkController</tt><big>(</big><em>bucket_queue</em>, <em>hold_queue</em><big>)</big><a class="headerlink" href="#celery.worker.controllers.PeriodicWorkController" title="Permalink to this definition">¶</a></dt>
+<dd><p>A thread that continuously checks if there are
+<tt class="xref docutils literal"><span class="pre">celery.task.PeriodicTask</span></tt> tasks waiting for execution,
+and executes them. It also finds tasks in the hold queue that is
+ready for execution and moves them to the bucket queue.</p>
+<p>(Tasks in the hold queue are tasks waiting for retry, or with an
+<tt class="docutils literal"><span class="pre">eta</span></tt>/<tt class="docutils literal"><span class="pre">countdown</span></tt>.)</p>
+<dl class="method">
+<dt id="celery.worker.controllers.PeriodicWorkController.process_hold_queue">
+<tt class="descname">process_hold_queue</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.controllers.PeriodicWorkController.process_hold_queue" title="Permalink to this definition">¶</a></dt>
+<dd>Finds paused tasks that are ready for execution and move
+them to the <tt class="xref docutils literal"><span class="pre">bucket_queue</span></tt>.</dd></dl>
+
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.worker.job.html"
+                                  title="previous chapter">Executable Jobs - celery.worker.job</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.pool.html"
+                                  title="next chapter">Task Pool - celery.pool</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.worker.controllers.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.pool.html" title="Task Pool - celery.pool"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.worker.job.html" title="Executable Jobs - celery.worker.job"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 276 - 0
reference/celery.worker.job.html

@@ -0,0 +1,276 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Executable Jobs - celery.worker.job &mdash; Celery v0.3.20 (unstable) documentation</title>
+    <link rel="stylesheet" href="../static/nature.css" type="text/css" />
+    <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '0.3.20 (unstable)',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../static/jquery.js"></script>
+    <script type="text/javascript" src="../static/doctools.js"></script>
+    <link rel="top" title="Celery v0.3.20 (unstable) documentation" href="../index.html" />
+    <link rel="up" title="Module API Reference" href="index.html" />
+    <link rel="next" title="Worker Controller Threads - celery.worker.controllers" href="celery.worker.controllers.html" />
+    <link rel="prev" title="Multiprocessing Worker - celery.worker" href="celery.worker.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             accesskey="M">modules</a> |</li>
+        <li class="right" >
+          <a href="celery.worker.controllers.html" title="Worker Controller Threads - celery.worker.controllers"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="celery.worker.html" title="Multiprocessing Worker - celery.worker"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="module-celery.worker.job">
+<h1>Executable Jobs - celery.worker.job<a class="headerlink" href="#module-celery.worker.job" title="Permalink to this headline">¶</a></h1>
+<p>Jobs Executable by the Worker Server.</p>
+<dl class="class">
+<dt id="celery.worker.job.TaskWrapper">
+<em class="property">
+class </em><tt class="descclassname">celery.worker.job.</tt><tt class="descname">TaskWrapper</tt><big>(</big><em>task_name</em>, <em>task_id</em>, <em>task_func</em>, <em>args</em>, <em>kwargs</em>, <em>on_acknowledge=None</em>, <em>**opts</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper" title="Permalink to this definition">¶</a></dt>
+<dd><p>Class wrapping a task to be run.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>task_name</em> &#8211; see <a title="celery.worker.job.TaskWrapper.task_name" class="reference internal" href="#celery.worker.job.TaskWrapper.task_name"><tt class="xref docutils literal"><span class="pre">task_name</span></tt></a>.</li>
+<li><em>task_id</em> &#8211; see <a title="celery.worker.job.TaskWrapper.task_id" class="reference internal" href="#celery.worker.job.TaskWrapper.task_id"><tt class="xref docutils literal"><span class="pre">task_id</span></tt></a>.</li>
+<li><em>task_func</em> &#8211; see <a title="celery.worker.job.TaskWrapper.task_func" class="reference internal" href="#celery.worker.job.TaskWrapper.task_func"><tt class="xref docutils literal"><span class="pre">task_func</span></tt></a></li>
+<li><em>args</em> &#8211; see <a title="celery.worker.job.TaskWrapper.args" class="reference internal" href="#celery.worker.job.TaskWrapper.args"><tt class="xref docutils literal"><span class="pre">args</span></tt></a></li>
+<li><em>kwargs</em> &#8211; see <a title="celery.worker.job.TaskWrapper.kwargs" class="reference internal" href="#celery.worker.job.TaskWrapper.kwargs"><tt class="xref docutils literal"><span class="pre">kwargs</span></tt></a>.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<dl class="attribute">
+<dt id="celery.worker.job.TaskWrapper.task_name">
+<tt class="descname">task_name</tt><a class="headerlink" href="#celery.worker.job.TaskWrapper.task_name" title="Permalink to this definition">¶</a></dt>
+<dd>Kind of task. Must be a name registered in the task registry.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.worker.job.TaskWrapper.task_id">
+<tt class="descname">task_id</tt><a class="headerlink" href="#celery.worker.job.TaskWrapper.task_id" title="Permalink to this definition">¶</a></dt>
+<dd>UUID of the task.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.worker.job.TaskWrapper.task_func">
+<tt class="descname">task_func</tt><a class="headerlink" href="#celery.worker.job.TaskWrapper.task_func" title="Permalink to this definition">¶</a></dt>
+<dd>The tasks callable object.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.worker.job.TaskWrapper.args">
+<tt class="descname">args</tt><a class="headerlink" href="#celery.worker.job.TaskWrapper.args" title="Permalink to this definition">¶</a></dt>
+<dd>List of positional arguments to apply to the task.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.worker.job.TaskWrapper.kwargs">
+<tt class="descname">kwargs</tt><a class="headerlink" href="#celery.worker.job.TaskWrapper.kwargs" title="Permalink to this definition">¶</a></dt>
+<dd>Mapping of keyword arguments to apply to the task.</dd></dl>
+
+<dl class="attribute">
+<dt id="celery.worker.job.TaskWrapper.message">
+<tt class="descname">message</tt><a class="headerlink" href="#celery.worker.job.TaskWrapper.message" title="Permalink to this definition">¶</a></dt>
+<dd>The original message sent. Used for acknowledging the message.</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.job.TaskWrapper.execute">
+<tt class="descname">execute</tt><big>(</big><em>loglevel=None</em>, <em>logfile=None</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper.execute" title="Permalink to this definition">¶</a></dt>
+<dd><p>Execute the task in a <a title="celery.worker.job.jail" class="reference internal" href="#celery.worker.job.jail"><tt class="xref docutils literal"><span class="pre">jail()</span></tt></a> and store return value
+and status in the task meta backend.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>loglevel</em> &#8211; The loglevel used by the task.</li>
+<li><em>logfile</em> &#8211; The logfile used by the task.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.job.TaskWrapper.execute_using_pool">
+<tt class="descname">execute_using_pool</tt><big>(</big><em>pool</em>, <em>loglevel=None</em>, <em>logfile=None</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper.execute_using_pool" title="Permalink to this definition">¶</a></dt>
+<dd><p>Like <a title="celery.worker.job.TaskWrapper.execute" class="reference internal" href="#celery.worker.job.TaskWrapper.execute"><tt class="xref docutils literal"><span class="pre">execute()</span></tt></a>, but using the <tt class="xref docutils literal"><span class="pre">multiprocessing</span></tt> pool.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><em>pool</em> &#8211; A <tt class="xref docutils literal"><span class="pre">multiprocessing.Pool</span></tt> instance.</li>
+<li><em>loglevel</em> &#8211; The loglevel used by the task.</li>
+<li><em>logfile</em> &#8211; The logfile used by the task.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>:returns <tt class="xref docutils literal"><span class="pre">multiprocessing.AsyncResult</span></tt> instance.</p>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.job.TaskWrapper.extend_with_default_kwargs">
+<tt class="descname">extend_with_default_kwargs</tt><big>(</big><em>loglevel</em>, <em>logfile</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper.extend_with_default_kwargs" title="Permalink to this definition">¶</a></dt>
+<dd><p>Extend the tasks keyword arguments with standard task arguments.</p>
+<p>These are <tt class="docutils literal"><span class="pre">logfile</span></tt>, <tt class="docutils literal"><span class="pre">loglevel</span></tt>, <tt class="docutils literal"><span class="pre">task_id</span></tt> and <tt class="docutils literal"><span class="pre">task_name</span></tt>.</p>
+</dd></dl>
+
+<dl class="classmethod">
+<dt id="celery.worker.job.TaskWrapper.from_message">
+<em class="property">
+classmethod </em><tt class="descname">from_message</tt><big>(</big><em>message</em>, <em>message_data</em>, <em>logger=None</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper.from_message" title="Permalink to this definition">¶</a></dt>
+<dd><p>Create a <a title="celery.worker.job.TaskWrapper" class="reference internal" href="#celery.worker.job.TaskWrapper"><tt class="xref docutils literal"><span class="pre">TaskWrapper</span></tt></a> from a task message sent by
+<a title="celery.messaging.TaskPublisher" class="reference external" href="celery.messaging.html#celery.messaging.TaskPublisher"><tt class="xref docutils literal"><span class="pre">celery.messaging.TaskPublisher</span></tt></a>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name" colspan="2">Raises UnknownTaskError:</th></tr>
+<tr><td>&nbsp;</td><td class="field-body">if the message does not describe a task,
+the message is also rejected.</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><a title="celery.worker.job.TaskWrapper" class="reference internal" href="#celery.worker.job.TaskWrapper"><tt class="xref docutils literal"><span class="pre">TaskWrapper</span></tt></a> instance.</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.job.TaskWrapper.on_failure">
+<tt class="descname">on_failure</tt><big>(</big><em>exc_info</em>, <em>meta</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper.on_failure" title="Permalink to this definition">¶</a></dt>
+<dd>The handler used if the task raised an exception.</dd></dl>
+
+<dl class="method">
+<dt id="celery.worker.job.TaskWrapper.on_success">
+<tt class="descname">on_success</tt><big>(</big><em>ret_value</em>, <em>meta</em><big>)</big><a class="headerlink" href="#celery.worker.job.TaskWrapper.on_success" title="Permalink to this definition">¶</a></dt>
+<dd>The handler used if the task was successfully processed (
+without raising an exception).</dd></dl>
+
+</dd></dl>
+
+<dl class="function">
+<dt id="celery.worker.job.jail">
+<tt class="descclassname">celery.worker.job.</tt><tt class="descname">jail</tt><big>(</big><em>task_id</em>, <em>task_name</em>, <em>func</em>, <em>args</em>, <em>kwargs</em><big>)</big><a class="headerlink" href="#celery.worker.job.jail" title="Permalink to this definition">¶</a></dt>
+<dd><p>Wraps the task in a jail, which catches all exceptions, and
+saves the status and result of the task execution to the task
+meta backend.</p>
+<p>If the call was successful, it saves the result to the task result
+backend, and sets the task status to <tt class="docutils literal"><span class="pre">&quot;DONE&quot;</span></tt>.</p>
+<p>If the call results in an exception, it saves the exception as the task
+result, and sets the task status to <tt class="docutils literal"><span class="pre">&quot;FAILURE&quot;</span></tt>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
+<li><em>task_id</em> &#8211; The id of the task.</li>
+<li><em>task_name</em> &#8211; The name of the task.</li>
+<li><em>func</em> &#8211; Callable object to execute.</li>
+<li><em>args</em> &#8211; List of positional args to pass on to the function.</li>
+<li><em>kwargs</em> &#8211; Keyword arguments mapping to pass on to the function.</li>
+</ul>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the function return value on success, or
+the exception instance on failure.</p>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <h4>Previous topic</h4>
+            <p class="topless"><a href="celery.worker.html"
+                                  title="previous chapter">Multiprocessing Worker - celery.worker</a></p>
+            <h4>Next topic</h4>
+            <p class="topless"><a href="celery.worker.controllers.html"
+                                  title="next chapter">Worker Controller Threads - celery.worker.controllers</a></p>
+            <h3>This Page</h3>
+            <ul class="this-page-menu">
+              <li><a href="../sources/reference/celery.worker.job.txt"
+                     rel="nofollow">Show Source</a></li>
+            </ul>
+          <div id="searchbox" style="display: none">
+            <h3>Quick search</h3>
+              <form class="search" action="../search.html" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="Go" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip" style="font-size: 90%">
+              Enter search terms or a module, class or function name.
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../modindex.html" title="Global Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="celery.worker.controllers.html" title="Worker Controller Threads - celery.worker.controllers"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="celery.worker.html" title="Multiprocessing Worker - celery.worker"
+             >previous</a> |</li>
+        <li><a href="../index.html">Celery v0.3.20 (unstable) documentation</a> &raquo;</li>
+          <li><a href="index.html" >Module API Reference</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+      &copy; Copyright 2009, Ask Solem.
+      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
+    </div>
+  </body>
+</html>

+ 8 - 0
sources/reference/celery.execute.txt

@@ -0,0 +1,8 @@
+==================================
+ Executing Tasks - celery.execute
+==================================
+
+.. currentmodule:: celery.execute
+
+.. automodule:: celery.execute
+    :members:

+ 8 - 0
sources/reference/celery.fields.txt

@@ -0,0 +1,8 @@
+===============================
+ Django Fields - celery.fields
+===============================
+
+.. currentmodule:: celery.fields
+
+.. automodule:: celery.fields
+    :members:

+ 8 - 0
sources/reference/celery.supervisor.txt

@@ -0,0 +1,8 @@
+========================================
+ Process Supervisor - celery.supervisor
+========================================
+
+.. currentmodule:: celery.supervisor
+
+.. automodule:: celery.supervisor
+    :members:

+ 8 - 0
sources/reference/celery.task.base.txt

@@ -0,0 +1,8 @@
+===================================
+ Defining Tasks - celery.task.base
+===================================
+
+.. currentmodule:: celery.task.base
+
+.. automodule:: celery.task.base
+    :members:

+ 8 - 0
sources/reference/celery.task.builtins.txt

@@ -0,0 +1,8 @@
+==============================================
+ Built-in Task Classes - celery.task.builtins
+==============================================
+
+.. currentmodule:: celery.task.builtins
+
+.. automodule:: celery.task.builtins
+    :members:

+ 8 - 0
sources/reference/celery.utils.txt

@@ -0,0 +1,8 @@
+========================================
+Multiprocessing Worker - celery.worker
+========================================
+
+.. currentmodule:: celery.utils
+
+.. automodule:: celery.utils
+    :members:

+ 8 - 0
sources/reference/celery.views.txt

@@ -0,0 +1,8 @@
+========================================
+Django Views - celery.views
+========================================
+
+.. currentmodule:: celery.views
+
+.. automodule:: celery.views
+    :members:

+ 8 - 0
sources/reference/celery.worker.controllers.txt

@@ -0,0 +1,8 @@
+=======================================================
+ Worker Controller Threads - celery.worker.controllers
+=======================================================
+
+.. currentmodule:: celery.worker.controllers
+
+.. automodule:: celery.worker.controllers
+    :members:

+ 8 - 0
sources/reference/celery.worker.job.txt

@@ -0,0 +1,8 @@
+=====================================
+ Executable Jobs - celery.worker.job
+=====================================
+
+.. currentmodule:: celery.worker.job
+
+.. automodule:: celery.worker.job
+    :members: