celery.models.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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>Django Models - celery.models &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="Django Fields - celery.fields" href="celery.fields.html" />
  23. <link rel="prev" title="Django Model Managers - celery.managers" href="celery.managers.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.fields.html" title="Django Fields - celery.fields"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="celery.managers.html" title="Django Model Managers - celery.managers"
  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="django-models-celery-models">
  50. <h1>Django Models - celery.models<a class="headerlink" href="#django-models-celery-models" title="Permalink to this headline">¶</a></h1>
  51. <dl class="data">
  52. <dt id="TASK_STATUS_PENDING">
  53. <tt class="descname">TASK_STATUS_PENDING</tt><a class="headerlink" href="#TASK_STATUS_PENDING" title="Permalink to this definition">¶</a></dt>
  54. <dd>The string status of a pending task.</dd></dl>
  55. <dl class="data">
  56. <dt id="TASK_STATUS_RETRY">
  57. <tt class="descname">TASK_STATUS_RETRY</tt><a class="headerlink" href="#TASK_STATUS_RETRY" title="Permalink to this definition">¶</a></dt>
  58. <dd>The string status of a task which is to be retried.</dd></dl>
  59. <dl class="data">
  60. <dt id="TASK_STATUS_FAILURE">
  61. <tt class="descname">TASK_STATUS_FAILURE</tt><a class="headerlink" href="#TASK_STATUS_FAILURE" title="Permalink to this definition">¶</a></dt>
  62. <dd>The string status of a failed task.</dd></dl>
  63. <dl class="data">
  64. <dt id="TASK_STATUS_DONE">
  65. <tt class="descname">TASK_STATUS_DONE</tt><a class="headerlink" href="#TASK_STATUS_DONE" title="Permalink to this definition">¶</a></dt>
  66. <dd>The string status of a task that was successfully executed.</dd></dl>
  67. <dl class="data">
  68. <dt id="TASK_STATUSES">
  69. <tt class="descname">TASK_STATUSES</tt><a class="headerlink" href="#TASK_STATUSES" title="Permalink to this definition">¶</a></dt>
  70. <dd>List of possible task statuses.</dd></dl>
  71. <dl class="data">
  72. <dt id="TASK_STATUSES_CHOICES">
  73. <tt class="descname">TASK_STATUSES_CHOICES</tt><a class="headerlink" href="#TASK_STATUSES_CHOICES" title="Permalink to this definition">¶</a></dt>
  74. <dd>Django choice tuple of possible task statuses, for usage in model/form
  75. fields <tt class="docutils literal"><span class="pre">choices</span></tt> argument.</dd></dl>
  76. <dl class="class">
  77. <dt id="TaskMeta">
  78. <em class="property">
  79. class </em><tt class="descname">TaskMeta</tt><a class="headerlink" href="#TaskMeta" title="Permalink to this definition">¶</a></dt>
  80. <dd><p>Model for storing the result and status of a task.</p>
  81. <p><em>Note</em> Only used if you&#8217;re running the <tt class="docutils literal"><span class="pre">database</span></tt> backend.</p>
  82. <dl class="attribute">
  83. <dt id="TaskMeta.task_id">
  84. <tt class="descname">task_id</tt><a class="headerlink" href="#TaskMeta.task_id" title="Permalink to this definition">¶</a></dt>
  85. <dd>The unique task id.</dd></dl>
  86. <dl class="attribute">
  87. <dt id="TaskMeta.status">
  88. <tt class="descname">status</tt><a class="headerlink" href="#TaskMeta.status" title="Permalink to this definition">¶</a></dt>
  89. <dd>The current status for this task.</dd></dl>
  90. <dl class="attribute">
  91. <dt id="TaskMeta.result">
  92. <tt class="descname">result</tt><a class="headerlink" href="#TaskMeta.result" title="Permalink to this definition">¶</a></dt>
  93. <dd>The result after successful/failed execution. If the task failed,
  94. this contains the execption it raised.</dd></dl>
  95. <dl class="attribute">
  96. <dt id="TaskMeta.date_done">
  97. <tt class="descname">date_done</tt><a class="headerlink" href="#TaskMeta.date_done" title="Permalink to this definition">¶</a></dt>
  98. <dd>The date this task changed status.</dd></dl>
  99. </dd></dl>
  100. <dl class="class">
  101. <dt id="PeriodicTaskMeta">
  102. <em class="property">
  103. class </em><tt class="descname">PeriodicTaskMeta</tt><a class="headerlink" href="#PeriodicTaskMeta" title="Permalink to this definition">¶</a></dt>
  104. <dd><p>Metadata model for periodic tasks.</p>
  105. <dl class="attribute">
  106. <dt id="PeriodicTaskMeta.name">
  107. <tt class="descname">name</tt><a class="headerlink" href="#PeriodicTaskMeta.name" title="Permalink to this definition">¶</a></dt>
  108. <dd>The name of this task, as registered in the task registry.</dd></dl>
  109. <dl class="attribute">
  110. <dt id="PeriodicTaskMeta.last_run_at">
  111. <tt class="descname">last_run_at</tt><a class="headerlink" href="#PeriodicTaskMeta.last_run_at" title="Permalink to this definition">¶</a></dt>
  112. <dd>The date this periodic task was last run. Used to find out
  113. when it should be run next.</dd></dl>
  114. <dl class="attribute">
  115. <dt id="PeriodicTaskMeta.total_run_count">
  116. <tt class="descname">total_run_count</tt><a class="headerlink" href="#PeriodicTaskMeta.total_run_count" title="Permalink to this definition">¶</a></dt>
  117. <dd>The number of times this periodic task has been run.</dd></dl>
  118. <dl class="attribute">
  119. <dt id="PeriodicTaskMeta.task">
  120. <tt class="descname">task</tt><a class="headerlink" href="#PeriodicTaskMeta.task" title="Permalink to this definition">¶</a></dt>
  121. <dd>The class/function for this task.</dd></dl>
  122. <dl class="method">
  123. <dt id="PeriodicTaskMeta.delay">
  124. <tt class="descname">delay</tt><big>(</big><big>)</big><a class="headerlink" href="#PeriodicTaskMeta.delay" title="Permalink to this definition">¶</a></dt>
  125. <dt>
  126. <tt class="descname">Delay the execution of a periodic task, and increment its total</tt></dt>
  127. <dt>
  128. <tt class="descname">run count.</tt></dt>
  129. <dd></dd></dl>
  130. </dd></dl>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="sphinxsidebar">
  136. <div class="sphinxsidebarwrapper">
  137. <h4>Previous topic</h4>
  138. <p class="topless"><a href="celery.managers.html"
  139. title="previous chapter">Django Model Managers - celery.managers</a></p>
  140. <h4>Next topic</h4>
  141. <p class="topless"><a href="celery.fields.html"
  142. title="next chapter">Django Fields - celery.fields</a></p>
  143. <h3>This Page</h3>
  144. <ul class="this-page-menu">
  145. <li><a href="../sources/reference/celery.models.txt"
  146. rel="nofollow">Show Source</a></li>
  147. </ul>
  148. <div id="searchbox" style="display: none">
  149. <h3>Quick search</h3>
  150. <form class="search" action="../search.html" method="get">
  151. <input type="text" name="q" size="18" />
  152. <input type="submit" value="Go" />
  153. <input type="hidden" name="check_keywords" value="yes" />
  154. <input type="hidden" name="area" value="default" />
  155. </form>
  156. <p class="searchtip" style="font-size: 90%">
  157. Enter search terms or a module, class or function name.
  158. </p>
  159. </div>
  160. <script type="text/javascript">$('#searchbox').show(0);</script>
  161. </div>
  162. </div>
  163. <div class="clearer"></div>
  164. </div>
  165. <div class="related">
  166. <h3>Navigation</h3>
  167. <ul>
  168. <li class="right" style="margin-right: 10px">
  169. <a href="../genindex.html" title="General Index"
  170. >index</a></li>
  171. <li class="right" >
  172. <a href="../modindex.html" title="Global Module Index"
  173. >modules</a> |</li>
  174. <li class="right" >
  175. <a href="celery.fields.html" title="Django Fields - celery.fields"
  176. >next</a> |</li>
  177. <li class="right" >
  178. <a href="celery.managers.html" title="Django Model Managers - celery.managers"
  179. >previous</a> |</li>
  180. <li><a href="../index.html">Celery v0.7.0 (unstable) documentation</a> &raquo;</li>
  181. <li><a href="index.html" >Module API Reference</a> &raquo;</li>
  182. </ul>
  183. </div>
  184. <div class="footer">
  185. &copy; Copyright 2009, Ask Solem.
  186. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
  187. </div>
  188. </body>
  189. </html>