celery.models.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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.3.5 (unstable) documentation</title>
  7. <link rel="stylesheet" href="../static/agogo.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.3.5 (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.3.5 (unstable) documentation" href="../index.html" />
  21. <link rel="up" title="Module API Reference" href="index.html" />
  22. <link rel="next" title="Messaging - celery.messaging" href="celery.messaging.html" />
  23. <link rel="prev" title="Django Model Managers - celery.managers" href="celery.managers.html" />
  24. </head>
  25. <body>
  26. <div class="header-wrapper">
  27. <div class="header">
  28. <h1><a href="../index.html">Celery v0.3.5 (unstable) documentation</a></h1>
  29. <div class="rel">
  30. <a href="../genindex.html" title="General Index"
  31. accesskey="I">index</a> |
  32. <a href="../modindex.html" title="Global Module Index"
  33. accesskey="M">modules</a> |
  34. <a href="celery.messaging.html" title="Messaging - celery.messaging"
  35. accesskey="N">next</a> |
  36. <a href="celery.managers.html" title="Django Model Managers - celery.managers"
  37. accesskey="P">previous</a>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="content-wrapper">
  42. <div class="content">
  43. <div class="document">
  44. <div class="documentwrapper">
  45. <div class="bodywrapper">
  46. <div class="body">
  47. <div class="section" id="django-models-celery-models">
  48. <h1>Django Models - celery.models<a class="headerlink" href="#django-models-celery-models" title="Permalink to this headline">¶</a></h1>
  49. <dl class="data">
  50. <dt id="TASK_STATUS_PENDING">
  51. <tt class="descname">TASK_STATUS_PENDING</tt><a class="headerlink" href="#TASK_STATUS_PENDING" title="Permalink to this definition">¶</a></dt>
  52. <dd>The string status of a pending task.</dd></dl>
  53. <dl class="data">
  54. <dt id="TASK_STATUS_RETRY">
  55. <tt class="descname">TASK_STATUS_RETRY</tt><a class="headerlink" href="#TASK_STATUS_RETRY" title="Permalink to this definition">¶</a></dt>
  56. <dd>The string status of a task which is to be retried.</dd></dl>
  57. <dl class="data">
  58. <dt id="TASK_STATUS_FAILURE">
  59. <tt class="descname">TASK_STATUS_FAILURE</tt><a class="headerlink" href="#TASK_STATUS_FAILURE" title="Permalink to this definition">¶</a></dt>
  60. <dd>The string status of a failed task.</dd></dl>
  61. <dl class="data">
  62. <dt id="TASK_STATUS_DONE">
  63. <tt class="descname">TASK_STATUS_DONE</tt><a class="headerlink" href="#TASK_STATUS_DONE" title="Permalink to this definition">¶</a></dt>
  64. <dd>The string status of a task that was successfully executed.</dd></dl>
  65. <dl class="data">
  66. <dt id="TASK_STATUSES">
  67. <tt class="descname">TASK_STATUSES</tt><a class="headerlink" href="#TASK_STATUSES" title="Permalink to this definition">¶</a></dt>
  68. <dd>List of possible task statuses.</dd></dl>
  69. <dl class="data">
  70. <dt id="TASK_STATUSES_CHOICES">
  71. <tt class="descname">TASK_STATUSES_CHOICES</tt><a class="headerlink" href="#TASK_STATUSES_CHOICES" title="Permalink to this definition">¶</a></dt>
  72. <dd>Django choice tuple of possible task statuses, for usage in model/form
  73. fields <tt class="docutils literal"><span class="pre">choices</span></tt> argument.</dd></dl>
  74. <dl class="class">
  75. <dt id="TaskMeta">
  76. <em class="property">
  77. class </em><tt class="descname">TaskMeta</tt><a class="headerlink" href="#TaskMeta" title="Permalink to this definition">¶</a></dt>
  78. <dd><p>Model for storing the result and status of a task.</p>
  79. <p><em>Note</em> Only used if you&#8217;re running the <tt class="docutils literal"><span class="pre">database</span></tt> backend.</p>
  80. <dl class="attribute">
  81. <dt id="TaskMeta.task_id">
  82. <tt class="descname">task_id</tt><a class="headerlink" href="#TaskMeta.task_id" title="Permalink to this definition">¶</a></dt>
  83. <dd>The unique task id.</dd></dl>
  84. <dl class="attribute">
  85. <dt id="TaskMeta.status">
  86. <tt class="descname">status</tt><a class="headerlink" href="#TaskMeta.status" title="Permalink to this definition">¶</a></dt>
  87. <dd>The current status for this task.</dd></dl>
  88. <dl class="attribute">
  89. <dt id="TaskMeta.result">
  90. <tt class="descname">result</tt><a class="headerlink" href="#TaskMeta.result" title="Permalink to this definition">¶</a></dt>
  91. <dd>The result after successful/failed execution. If the task failed,
  92. this contains the execption it raised.</dd></dl>
  93. <dl class="attribute">
  94. <dt id="TaskMeta.date_done">
  95. <tt class="descname">date_done</tt><a class="headerlink" href="#TaskMeta.date_done" title="Permalink to this definition">¶</a></dt>
  96. <dd>The date this task changed status.</dd></dl>
  97. </dd></dl>
  98. <dl class="class">
  99. <dt id="PeriodicTaskMeta">
  100. <em class="property">
  101. class </em><tt class="descname">PeriodicTaskMeta</tt><a class="headerlink" href="#PeriodicTaskMeta" title="Permalink to this definition">¶</a></dt>
  102. <dd><p>Metadata model for periodic tasks.</p>
  103. <dl class="attribute">
  104. <dt id="PeriodicTaskMeta.name">
  105. <tt class="descname">name</tt><a class="headerlink" href="#PeriodicTaskMeta.name" title="Permalink to this definition">¶</a></dt>
  106. <dd>The name of this task, as registered in the task registry.</dd></dl>
  107. <dl class="attribute">
  108. <dt id="PeriodicTaskMeta.last_run_at">
  109. <tt class="descname">last_run_at</tt><a class="headerlink" href="#PeriodicTaskMeta.last_run_at" title="Permalink to this definition">¶</a></dt>
  110. <dd>The date this periodic task was last run. Used to find out
  111. when it should be run next.</dd></dl>
  112. <dl class="attribute">
  113. <dt id="PeriodicTaskMeta.total_run_count">
  114. <tt class="descname">total_run_count</tt><a class="headerlink" href="#PeriodicTaskMeta.total_run_count" title="Permalink to this definition">¶</a></dt>
  115. <dd>The number of times this periodic task has been run.</dd></dl>
  116. <dl class="attribute">
  117. <dt id="PeriodicTaskMeta.task">
  118. <tt class="descname">task</tt><a class="headerlink" href="#PeriodicTaskMeta.task" title="Permalink to this definition">¶</a></dt>
  119. <dd>The class/function for this task.</dd></dl>
  120. <dl class="method">
  121. <dt id="PeriodicTaskMeta.delay">
  122. <tt class="descname">delay</tt><big>(</big><big>)</big><a class="headerlink" href="#PeriodicTaskMeta.delay" title="Permalink to this definition">¶</a></dt>
  123. <dt>
  124. <tt class="descname">Delay the execution of a periodic task, and increment its total</tt></dt>
  125. <dt>
  126. <tt class="descname">run count.</tt></dt>
  127. <dd></dd></dl>
  128. </dd></dl>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="sidebar">
  135. <h3>Contents</h3>
  136. <ul class="current">
  137. <li class="toctree-l1"><a class="reference external" href="../introduction.html">celery - Distributed Task Queue for Django.</a></li>
  138. <li class="toctree-l1"><a class="reference external" href="../faq.html">Frequently Asked Questions</a></li>
  139. <li class="toctree-l1 current"><a class="reference external" href="index.html">Module API Reference</a><ul class="current">
  140. <li class="toctree-l2"><a class="reference external" href="celery.task.html">Tasks - celery.task</a></li>
  141. <li class="toctree-l2"><a class="reference external" href="celery.result.html">Task Result - celery.result</a></li>
  142. <li class="toctree-l2"><a class="reference external" href="celery.registry.html">Task Registry - celery.registry</a></li>
  143. <li class="toctree-l2"><a class="reference external" href="celery.discovery.html">Task Discovery - celery.discovery</a></li>
  144. <li class="toctree-l2"><a class="reference external" href="celery.worker.html">Multiprocessing Worker - celery.worker</a></li>
  145. <li class="toctree-l2"><a class="reference external" href="celery.pool.html">Task Pool - celery.pool</a></li>
  146. <li class="toctree-l2"><a class="reference external" href="celery.backends.html">Backends - celery.backends</a></li>
  147. <li class="toctree-l2"><a class="reference external" href="celery.backends.base.html">Backend: Base - celery.backends.base</a></li>
  148. <li class="toctree-l2"><a class="reference external" href="celery.backends.database.html">Backend: Database - celery.backends.database</a></li>
  149. <li class="toctree-l2"><a class="reference external" href="celery.backends.cache.html">Backend: Cache - celery.backends.cache</a></li>
  150. <li class="toctree-l2"><a class="reference external" href="celery.backends.tyrant.html">Backend: Tokyo Tyrant - celery.backends.tyrant</a></li>
  151. <li class="toctree-l2"><a class="reference external" href="celery.conf.html">Configuration - celery.conf</a></li>
  152. <li class="toctree-l2"><a class="reference external" href="celery.datastructures.html">Datastructures - celery.datastructures</a></li>
  153. <li class="toctree-l2"><a class="reference external" href="celery.log.html">Logging - celery.log</a></li>
  154. <li class="toctree-l2"><a class="reference external" href="celery.managers.html">Django Model Managers - celery.managers</a></li>
  155. <li class="toctree-l2 current"><a class="current reference external" href="">Django Models - celery.models</a></li>
  156. <li class="toctree-l2"><a class="reference external" href="celery.messaging.html">Messaging - celery.messaging</a></li>
  157. <li class="toctree-l2"><a class="reference external" href="celery.timer.html">Timers - celery.timer</a></li>
  158. <li class="toctree-l2"><a class="reference external" href="celery.bin.celeryd.html">Celery Worker Daemon - celery.bin.celeryd</a></li>
  159. </ul>
  160. </li>
  161. <li class="toctree-l1"><a class="reference external" href="../changelog.html">Change history</a></li>
  162. </ul>
  163. <h3 style="margin-top: 1.5em;">Search</h3>
  164. <form class="search" action="../search.html" method="get">
  165. <input type="text" name="q" size="18" />
  166. <input type="submit" value="Go" />
  167. <input type="hidden" name="check_keywords" value="yes" />
  168. <input type="hidden" name="area" value="default" />
  169. </form>
  170. <p class="searchtip" style="font-size: 90%">
  171. Enter search terms or a module, class or function name.
  172. </p>
  173. </div>
  174. <div class="clearer"></div>
  175. </div>
  176. </div>
  177. <div class="footer-wrapper">
  178. <div class="footer">
  179. <div class="left">
  180. <a href="../genindex.html" title="General Index"
  181. >index</a> |
  182. <a href="../modindex.html" title="Global Module Index"
  183. >modules</a> |
  184. <a href="celery.messaging.html" title="Messaging - celery.messaging"
  185. >next</a> |
  186. <a href="celery.managers.html" title="Django Model Managers - celery.managers"
  187. >previous</a>
  188. <br/>
  189. <a href="../sources/reference/celery.models.txt"
  190. rel="nofollow">Show Source</a>
  191. </div>
  192. <div class="right">
  193. &copy; Copyright 2009, Ask Solem.<br/>
  194. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.1.
  195. </div>
  196. <div class="clearer"></div>
  197. </div>
  198. </div>
  199. </body>
  200. </html>