celery.bin.celeryd.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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>Celery Worker Daemon - celery.bin.celeryd &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="Change history" href="../changelog.html" />
  23. <link rel="prev" title="Timers - celery.timer" href="celery.timer.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="../changelog.html" title="Change history"
  35. accesskey="N">next</a> |
  36. <a href="celery.timer.html" title="Timers - celery.timer"
  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="module-celery.bin.celeryd">
  48. <h1>Celery Worker Daemon - celery.bin.celeryd<a class="headerlink" href="#module-celery.bin.celeryd" title="Permalink to this headline">¶</a></h1>
  49. <p>celeryd</p>
  50. <dl class="cmdoption">
  51. <dt id="cmdoption-celeryd-c">
  52. <tt class="descname">-c</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--concurrency</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-c" title="Permalink to this definition">¶</a></dt>
  53. <dd>Number of child processes processing the queue.</dd></dl>
  54. <dl class="cmdoption">
  55. <dt id="cmdoption-celeryd-f">
  56. <tt class="descname">-f</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--logfile</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-f" title="Permalink to this definition">¶</a></dt>
  57. <dd>Path to log file. If no logfile is specified, <tt class="docutils literal"><span class="pre">stderr</span></tt> is used.</dd></dl>
  58. <dl class="cmdoption">
  59. <dt id="cmdoption-celeryd-l">
  60. <tt class="descname">-l</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--loglevel</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-l" title="Permalink to this definition">¶</a></dt>
  61. <dd>Logging level, choose between <tt class="docutils literal"><span class="pre">DEBUG</span></tt>, <tt class="docutils literal"><span class="pre">INFO</span></tt>, <tt class="docutils literal"><span class="pre">WARNING</span></tt>,
  62. <tt class="docutils literal"><span class="pre">ERROR</span></tt>, <tt class="docutils literal"><span class="pre">CRITICAL</span></tt>, or <tt class="docutils literal"><span class="pre">FATAL</span></tt>.</dd></dl>
  63. <dl class="cmdoption">
  64. <dt id="cmdoption-celeryd-p">
  65. <tt class="descname">-p</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--pidfile</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-p" title="Permalink to this definition">¶</a></dt>
  66. <dd>Path to pidfile.</dd></dl>
  67. <dl class="cmdoption">
  68. <dt id="cmdoption-celeryd-w">
  69. <tt class="descname">-w</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--wakeup-after</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-w" title="Permalink to this definition">¶</a></dt>
  70. <dd>If the queue is empty, this is the time <em>in seconds</em> the
  71. daemon sleeps until it wakes up to check if there&#8217;s any
  72. new messages on the queue.</dd></dl>
  73. <dl class="cmdoption">
  74. <dt id="cmdoption-celeryd-d">
  75. <tt class="descname">-d</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--detach</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--daemon</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-d" title="Permalink to this definition">¶</a></dt>
  76. <dd>Run in the background as a daemon.</dd></dl>
  77. <dl class="cmdoption">
  78. <dt id="cmdoption-celeryd--discard">
  79. <tt class="descname">--discard</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--discard" title="Permalink to this definition">¶</a></dt>
  80. <dd>Discard all waiting tasks before the daemon is started.
  81. <strong>WARNING</strong>: This is unrecoverable, and the tasks will be
  82. deleted from the messaging server.</dd></dl>
  83. <dl class="cmdoption">
  84. <dt id="cmdoption-celeryd-u">
  85. <tt class="descname">-u</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--uid</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-u" title="Permalink to this definition">¶</a></dt>
  86. <dd>User-id to run <tt class="docutils literal"><span class="pre">celeryd</span></tt> as when in daemon mode.</dd></dl>
  87. <dl class="cmdoption">
  88. <dt id="cmdoption-celeryd-g">
  89. <tt class="descname">-g</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--gid</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-g" title="Permalink to this definition">¶</a></dt>
  90. <dd>Group-id to run <tt class="docutils literal"><span class="pre">celeryd</span></tt> as when in daemon mode.</dd></dl>
  91. <dl class="cmdoption">
  92. <dt id="cmdoption-celeryd--umask">
  93. <tt class="descname">--umask</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--umask" title="Permalink to this definition">¶</a></dt>
  94. <dd>umask of the process when in daemon mode.</dd></dl>
  95. <dl class="cmdoption">
  96. <dt id="cmdoption-celeryd--workdir">
  97. <tt class="descname">--workdir</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--workdir" title="Permalink to this definition">¶</a></dt>
  98. <dd>Directory to change to when in daemon mode.</dd></dl>
  99. <dl class="cmdoption">
  100. <dt id="cmdoption-celeryd--chroot">
  101. <tt class="descname">--chroot</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--chroot" title="Permalink to this definition">¶</a></dt>
  102. <dd>Change root directory to this path when in daemon mode.</dd></dl>
  103. <dl class="function">
  104. <dt id="celery.bin.celeryd.acquire_pidlock">
  105. <tt class="descclassname">celery.bin.celeryd.</tt><tt class="descname">acquire_pidlock</tt><big>(</big><em>pidfile</em><big>)</big><a class="headerlink" href="#celery.bin.celeryd.acquire_pidlock" title="Permalink to this definition">¶</a></dt>
  106. <dd><p>Get the <tt class="xref docutils literal"><span class="pre">daemon.pidlockfile.PIDLockFile</span></tt> handler for
  107. <tt class="docutils literal"><span class="pre">pidfile</span></tt>.</p>
  108. <p>If the <tt class="docutils literal"><span class="pre">pidfile</span></tt> already exists, but the process is not running the
  109. <tt class="docutils literal"><span class="pre">pidfile</span></tt> will be removed, a <tt class="docutils literal"><span class="pre">&quot;stale</span> <span class="pre">pidfile&quot;</span></tt> message is emitted
  110. and execution continues as normally. However, if the process is still
  111. running the program will exit complaning that the program is already
  112. running in the background somewhere.</p>
  113. </dd></dl>
  114. <dl class="function">
  115. <dt id="celery.bin.celeryd.parse_options">
  116. <tt class="descclassname">celery.bin.celeryd.</tt><tt class="descname">parse_options</tt><big>(</big><em>arguments</em><big>)</big><a class="headerlink" href="#celery.bin.celeryd.parse_options" title="Permalink to this definition">¶</a></dt>
  117. <dd>Parse the available options to <tt class="docutils literal"><span class="pre">celeryd</span></tt>.</dd></dl>
  118. <dl class="function">
  119. <dt id="celery.bin.celeryd.run_worker">
  120. <tt class="descclassname">celery.bin.celeryd.</tt><tt class="descname">run_worker</tt><big>(</big><em>concurrency=10</em>, <em>daemon=False</em>, <em>loglevel=20</em>, <em>logfile='celeryd.log'</em>, <em>discard=False</em>, <em>pidfile='celeryd.pid'</em>, <em>queue_wakeup_after=0.10000000000000001</em>, <em>umask=0</em>, <em>uid=None</em>, <em>gid=None</em>, <em>working_directory=None</em>, <em>chroot=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.bin.celeryd.run_worker" title="Permalink to this definition">¶</a></dt>
  121. <dd>Run the celery daemon.</dd></dl>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="sidebar">
  128. <h3>Contents</h3>
  129. <ul class="current">
  130. <li class="toctree-l1"><a class="reference external" href="../introduction.html">celery - Distributed Task Queue for Django.</a></li>
  131. <li class="toctree-l1"><a class="reference external" href="../faq.html">Frequently Asked Questions</a></li>
  132. <li class="toctree-l1 current"><a class="reference external" href="index.html">Module API Reference</a><ul class="current">
  133. <li class="toctree-l2"><a class="reference external" href="celery.task.html">Tasks - celery.task</a></li>
  134. <li class="toctree-l2"><a class="reference external" href="celery.result.html">Task Result - celery.result</a></li>
  135. <li class="toctree-l2"><a class="reference external" href="celery.registry.html">Task Registry - celery.registry</a></li>
  136. <li class="toctree-l2"><a class="reference external" href="celery.discovery.html">Task Discovery - celery.discovery</a></li>
  137. <li class="toctree-l2"><a class="reference external" href="celery.worker.html">Multiprocessing Worker - celery.worker</a></li>
  138. <li class="toctree-l2"><a class="reference external" href="celery.pool.html">Task Pool - celery.pool</a></li>
  139. <li class="toctree-l2"><a class="reference external" href="celery.backends.html">Backends - celery.backends</a></li>
  140. <li class="toctree-l2"><a class="reference external" href="celery.backends.base.html">Backend: Base - celery.backends.base</a></li>
  141. <li class="toctree-l2"><a class="reference external" href="celery.backends.database.html">Backend: Database - celery.backends.database</a></li>
  142. <li class="toctree-l2"><a class="reference external" href="celery.backends.cache.html">Backend: Cache - celery.backends.cache</a></li>
  143. <li class="toctree-l2"><a class="reference external" href="celery.backends.tyrant.html">Backend: Tokyo Tyrant - celery.backends.tyrant</a></li>
  144. <li class="toctree-l2"><a class="reference external" href="celery.conf.html">Configuration - celery.conf</a></li>
  145. <li class="toctree-l2"><a class="reference external" href="celery.datastructures.html">Datastructures - celery.datastructures</a></li>
  146. <li class="toctree-l2"><a class="reference external" href="celery.log.html">Logging - celery.log</a></li>
  147. <li class="toctree-l2"><a class="reference external" href="celery.managers.html">Django Model Managers - celery.managers</a></li>
  148. <li class="toctree-l2"><a class="reference external" href="celery.models.html">Django Models - celery.models</a></li>
  149. <li class="toctree-l2"><a class="reference external" href="celery.messaging.html">Messaging - celery.messaging</a></li>
  150. <li class="toctree-l2"><a class="reference external" href="celery.timer.html">Timers - celery.timer</a></li>
  151. <li class="toctree-l2 current"><a class="current reference external" href="">Celery Worker Daemon - celery.bin.celeryd</a></li>
  152. </ul>
  153. </li>
  154. <li class="toctree-l1"><a class="reference external" href="../changelog.html">Change history</a></li>
  155. </ul>
  156. <h3 style="margin-top: 1.5em;">Search</h3>
  157. <form class="search" action="../search.html" method="get">
  158. <input type="text" name="q" size="18" />
  159. <input type="submit" value="Go" />
  160. <input type="hidden" name="check_keywords" value="yes" />
  161. <input type="hidden" name="area" value="default" />
  162. </form>
  163. <p class="searchtip" style="font-size: 90%">
  164. Enter search terms or a module, class or function name.
  165. </p>
  166. </div>
  167. <div class="clearer"></div>
  168. </div>
  169. </div>
  170. <div class="footer-wrapper">
  171. <div class="footer">
  172. <div class="left">
  173. <a href="../genindex.html" title="General Index"
  174. >index</a> |
  175. <a href="../modindex.html" title="Global Module Index"
  176. >modules</a> |
  177. <a href="../changelog.html" title="Change history"
  178. >next</a> |
  179. <a href="celery.timer.html" title="Timers - celery.timer"
  180. >previous</a>
  181. <br/>
  182. <a href="../sources/reference/celery.bin.celeryd.txt"
  183. rel="nofollow">Show Source</a>
  184. </div>
  185. <div class="right">
  186. &copy; Copyright 2009, Ask Solem.<br/>
  187. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.1.
  188. </div>
  189. <div class="clearer"></div>
  190. </div>
  191. </div>
  192. </body>
  193. </html>