celery.registry.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Task Registry - celery.registry &mdash; Celery v0.7.0 (unstable) documentation</title>
  7. <link rel="stylesheet" href="../static/nature.css" type="text/css" />
  8. <link rel="stylesheet" href="../static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '0.7.0 (unstable)',
  13. COLLAPSE_MODINDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../static/jquery.js"></script>
  19. <script type="text/javascript" src="../static/doctools.js"></script>
  20. <link rel="top" title="Celery v0.7.0 (unstable) documentation" href="../index.html" />
  21. <link rel="up" title="Module API Reference" href="index.html" />
  22. <link rel="next" title="Signals - celery.signals" href="celery.signals.html" />
  23. <link rel="prev" title="Task Information and Utilities - celery.task" href="celery.task.html" />
  24. </head>
  25. <body>
  26. <div class="related">
  27. <h3>Navigation</h3>
  28. <ul>
  29. <li class="right" style="margin-right: 10px">
  30. <a href="../genindex.html" title="General Index"
  31. accesskey="I">index</a></li>
  32. <li class="right" >
  33. <a href="../modindex.html" title="Global Module Index"
  34. accesskey="M">modules</a> |</li>
  35. <li class="right" >
  36. <a href="celery.signals.html" title="Signals - celery.signals"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="celery.task.html" title="Task Information and Utilities - celery.task"
  40. accesskey="P">previous</a> |</li>
  41. <li><a href="../index.html">Celery v0.7.0 (unstable) documentation</a> &raquo;</li>
  42. <li><a href="index.html" accesskey="U">Module API Reference</a> &raquo;</li>
  43. </ul>
  44. </div>
  45. <div class="document">
  46. <div class="documentwrapper">
  47. <div class="bodywrapper">
  48. <div class="body">
  49. <div class="section" id="module-celery.registry">
  50. <h1>Task Registry - celery.registry<a class="headerlink" href="#module-celery.registry" title="Permalink to this headline">¶</a></h1>
  51. <p>celery.registry</p>
  52. <dl class="class">
  53. <dt id="celery.registry.TaskRegistry">
  54. <em class="property">
  55. class </em><tt class="descclassname">celery.registry.</tt><tt class="descname">TaskRegistry</tt><a class="headerlink" href="#celery.registry.TaskRegistry" title="Permalink to this definition">¶</a></dt>
  56. <dd><p>Site registry for tasks.</p>
  57. <dl class="exception">
  58. <dt id="celery.registry.TaskRegistry.AlreadyRegistered">
  59. <em class="property">
  60. exception </em><tt class="descname">AlreadyRegistered</tt><a class="headerlink" href="#celery.registry.TaskRegistry.AlreadyRegistered" title="Permalink to this definition">¶</a></dt>
  61. <dd>The task is already registered.</dd></dl>
  62. <dl class="exception">
  63. <dt id="celery.registry.TaskRegistry.NotRegistered">
  64. <em class="property">
  65. exception </em><tt class="descclassname">TaskRegistry.</tt><tt class="descname">NotRegistered</tt><a class="headerlink" href="#celery.registry.TaskRegistry.NotRegistered" title="Permalink to this definition">¶</a></dt>
  66. <dd>The task is not registered.</dd></dl>
  67. <dl class="method">
  68. <dt id="celery.registry.TaskRegistry.autodiscover">
  69. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">autodiscover</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.autodiscover" title="Permalink to this definition">¶</a></dt>
  70. <dd>Autodiscovers tasks using <a title="celery.discovery.autodiscover" class="reference external" href="celery.discovery.html#celery.discovery.autodiscover"><tt class="xref docutils literal"><span class="pre">celery.discovery.autodiscover()</span></tt></a>.</dd></dl>
  71. <dl class="method">
  72. <dt id="celery.registry.TaskRegistry.filter_types">
  73. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">filter_types</tt><big>(</big><em>type</em><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.filter_types" title="Permalink to this definition">¶</a></dt>
  74. <dd>Return all tasks of a specific type.</dd></dl>
  75. <dl class="method">
  76. <dt id="celery.registry.TaskRegistry.get_all">
  77. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">get_all</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.get_all" title="Permalink to this definition">¶</a></dt>
  78. <dd>Get all task types.</dd></dl>
  79. <dl class="method">
  80. <dt id="celery.registry.TaskRegistry.get_all_periodic">
  81. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">get_all_periodic</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.get_all_periodic" title="Permalink to this definition">¶</a></dt>
  82. <dd>Get all periodic task types.</dd></dl>
  83. <dl class="method">
  84. <dt id="celery.registry.TaskRegistry.get_all_regular">
  85. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">get_all_regular</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.get_all_regular" title="Permalink to this definition">¶</a></dt>
  86. <dd>Get all regular task types.</dd></dl>
  87. <dl class="method">
  88. <dt id="celery.registry.TaskRegistry.get_task">
  89. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">get_task</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.get_task" title="Permalink to this definition">¶</a></dt>
  90. <dd>Get task by name.</dd></dl>
  91. <dl class="method">
  92. <dt id="celery.registry.TaskRegistry.register">
  93. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">register</tt><big>(</big><em>task</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.register" title="Permalink to this definition">¶</a></dt>
  94. <dd><p>Register a task in the task registry.</p>
  95. <p>Task can either be a regular function, or a class inheriting
  96. from <tt class="xref docutils literal"><span class="pre">celery.task.Task</span></tt>.</p>
  97. <table class="docutils field-list" frame="void" rules="none">
  98. <col class="field-name" />
  99. <col class="field-body" />
  100. <tbody valign="top">
  101. <tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>name</em> &#8211; By default the <tt class="xref docutils literal"><span class="pre">Task.name</span></tt> attribute on the
  102. task is used as the name of the task, but you can override it
  103. using this option.</td>
  104. </tr>
  105. <tr class="field"><th class="field-name" colspan="2">Raises <a title="celery.registry.TaskRegistry.AlreadyRegistered" class="reference internal" href="#celery.registry.TaskRegistry.AlreadyRegistered">AlreadyRegistered</a>:</th></tr>
  106. <tr><td>&nbsp;</td><td class="field-body">if the task is already registered.</td>
  107. </tr>
  108. </tbody>
  109. </table>
  110. </dd></dl>
  111. <dl class="method">
  112. <dt id="celery.registry.TaskRegistry.unregister">
  113. <tt class="descclassname">TaskRegistry.</tt><tt class="descname">unregister</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#celery.registry.TaskRegistry.unregister" title="Permalink to this definition">¶</a></dt>
  114. <dd><p>Unregister task by name.</p>
  115. <table class="docutils field-list" frame="void" rules="none">
  116. <col class="field-name" />
  117. <col class="field-body" />
  118. <tbody valign="top">
  119. <tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>name</em> &#8211; name of the task to unregister, or a
  120. <tt class="xref docutils literal"><span class="pre">celery.task.Task</span></tt> class with a valid <tt class="docutils literal"><span class="pre">name</span></tt> attribute.</td>
  121. </tr>
  122. <tr class="field"><th class="field-name" colspan="2">Raises <a title="celery.exceptions.NotRegistered" class="reference external" href="celery.exceptions.html#celery.exceptions.NotRegistered">celery.exceptions.NotRegistered</a>:</th></tr>
  123. <tr><td>&nbsp;</td><td class="field-body">if the task has not
  124. been registered.</td>
  125. </tr>
  126. </tbody>
  127. </table>
  128. </dd></dl>
  129. </dd></dl>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="sphinxsidebar">
  135. <div class="sphinxsidebarwrapper">
  136. <h4>Previous topic</h4>
  137. <p class="topless"><a href="celery.task.html"
  138. title="previous chapter">Task Information and Utilities - celery.task</a></p>
  139. <h4>Next topic</h4>
  140. <p class="topless"><a href="celery.signals.html"
  141. title="next chapter">Signals - celery.signals</a></p>
  142. <h3>This Page</h3>
  143. <ul class="this-page-menu">
  144. <li><a href="../sources/reference/celery.registry.txt"
  145. rel="nofollow">Show Source</a></li>
  146. </ul>
  147. <div id="searchbox" style="display: none">
  148. <h3>Quick search</h3>
  149. <form class="search" action="../search.html" method="get">
  150. <input type="text" name="q" size="18" />
  151. <input type="submit" value="Go" />
  152. <input type="hidden" name="check_keywords" value="yes" />
  153. <input type="hidden" name="area" value="default" />
  154. </form>
  155. <p class="searchtip" style="font-size: 90%">
  156. Enter search terms or a module, class or function name.
  157. </p>
  158. </div>
  159. <script type="text/javascript">$('#searchbox').show(0);</script>
  160. </div>
  161. </div>
  162. <div class="clearer"></div>
  163. </div>
  164. <div class="related">
  165. <h3>Navigation</h3>
  166. <ul>
  167. <li class="right" style="margin-right: 10px">
  168. <a href="../genindex.html" title="General Index"
  169. >index</a></li>
  170. <li class="right" >
  171. <a href="../modindex.html" title="Global Module Index"
  172. >modules</a> |</li>
  173. <li class="right" >
  174. <a href="celery.signals.html" title="Signals - celery.signals"
  175. >next</a> |</li>
  176. <li class="right" >
  177. <a href="celery.task.html" title="Task Information and Utilities - celery.task"
  178. >previous</a> |</li>
  179. <li><a href="../index.html">Celery v0.7.0 (unstable) documentation</a> &raquo;</li>
  180. <li><a href="index.html" >Module API Reference</a> &raquo;</li>
  181. </ul>
  182. </div>
  183. <div class="footer">
  184. &copy; Copyright 2009, Ask Solem.
  185. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
  186. </div>
  187. </body>
  188. </html>