celery.bin.celeryd.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.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="Celery Initialize - celery.bin.celeryinit" href="celery.bin.celeryinit.html" />
  23. <link rel="prev" title="Django Fields - celery.fields" href="celery.fields.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.bin.celeryinit.html" title="Celery Initialize - celery.bin.celeryinit"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="celery.fields.html" title="Django Fields - celery.fields"
  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.bin.celeryd">
  50. <h1>Celery Worker Daemon - celery.bin.celeryd<a class="headerlink" href="#module-celery.bin.celeryd" title="Permalink to this headline">¶</a></h1>
  51. <p>celeryd</p>
  52. <dl class="cmdoption">
  53. <dt id="cmdoption-celeryd-c">
  54. <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>
  55. <dd>Number of child processes processing the queue. The default
  56. is the number of CPUs available on your system.</dd></dl>
  57. <dl class="cmdoption">
  58. <dt id="cmdoption-celeryd-f">
  59. <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>
  60. <dd>Path to log file. If no logfile is specified, <tt class="docutils literal"><span class="pre">stderr</span></tt> is used.</dd></dl>
  61. <dl class="cmdoption">
  62. <dt id="cmdoption-celeryd-l">
  63. <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>
  64. <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>,
  65. <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>
  66. <dl class="cmdoption">
  67. <dt id="cmdoption-celeryd-p">
  68. <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>
  69. <dd>Path to pidfile.</dd></dl>
  70. <dl class="cmdoption">
  71. <dt id="cmdoption-celeryd-s">
  72. <tt class="descname">-s</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--statistics</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-s" title="Permalink to this definition">¶</a></dt>
  73. <dd>Turn on reporting of statistics (remember to flush the statistics message
  74. queue from time to time).</dd></dl>
  75. <dl class="cmdoption">
  76. <dt id="cmdoption-celeryd-d">
  77. <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>
  78. <dd>Run in the background as a daemon.</dd></dl>
  79. <dl class="cmdoption">
  80. <dt id="cmdoption-celeryd-S">
  81. <tt class="descname">-S</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--supervised</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd-S" title="Permalink to this definition">¶</a></dt>
  82. <dd>Restart the worker server if it dies.</dd></dl>
  83. <dl class="cmdoption">
  84. <dt id="cmdoption-celeryd--discard">
  85. <tt class="descname">--discard</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--discard" title="Permalink to this definition">¶</a></dt>
  86. <dd>Discard all waiting tasks before the daemon is started.
  87. <strong>WARNING</strong>: This is unrecoverable, and the tasks will be
  88. deleted from the messaging server.</dd></dl>
  89. <dl class="cmdoption">
  90. <dt id="cmdoption-celeryd-u">
  91. <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>
  92. <dd>User-id to run <tt class="docutils literal"><span class="pre">celeryd</span></tt> as when in daemon mode.</dd></dl>
  93. <dl class="cmdoption">
  94. <dt id="cmdoption-celeryd-g">
  95. <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>
  96. <dd>Group-id to run <tt class="docutils literal"><span class="pre">celeryd</span></tt> as when in daemon mode.</dd></dl>
  97. <dl class="cmdoption">
  98. <dt id="cmdoption-celeryd--umask">
  99. <tt class="descname">--umask</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--umask" title="Permalink to this definition">¶</a></dt>
  100. <dd>umask of the process when in daemon mode.</dd></dl>
  101. <dl class="cmdoption">
  102. <dt id="cmdoption-celeryd--workdir">
  103. <tt class="descname">--workdir</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--workdir" title="Permalink to this definition">¶</a></dt>
  104. <dd>Directory to change to when in daemon mode.</dd></dl>
  105. <dl class="cmdoption">
  106. <dt id="cmdoption-celeryd--chroot">
  107. <tt class="descname">--chroot</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-celeryd--chroot" title="Permalink to this definition">¶</a></dt>
  108. <dd>Change root directory to this path when in daemon mode.</dd></dl>
  109. <dl class="function">
  110. <dt id="celery.bin.celeryd.acquire_pidlock">
  111. <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>
  112. <dd><p>Get the <tt class="xref docutils literal"><span class="pre">daemon.pidlockfile.PIDLockFile</span></tt> handler for
  113. <tt class="docutils literal"><span class="pre">pidfile</span></tt>.</p>
  114. <p>If the <tt class="docutils literal"><span class="pre">pidfile</span></tt> already exists, but the process is not running the
  115. <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
  116. and execution continues as normally. However, if the process is still
  117. running the program will exit complaning that the program is already
  118. running in the background somewhere.</p>
  119. </dd></dl>
  120. <dl class="function">
  121. <dt id="celery.bin.celeryd.install_restart_signal_handler">
  122. <tt class="descclassname">celery.bin.celeryd.</tt><tt class="descname">install_restart_signal_handler</tt><big>(</big><em>worker</em><big>)</big><a class="headerlink" href="#celery.bin.celeryd.install_restart_signal_handler" title="Permalink to this definition">¶</a></dt>
  123. <dd>Installs a signal handler that restarts the current program
  124. when it receives the <tt class="docutils literal"><span class="pre">SIGHUP</span></tt> signal.</dd></dl>
  125. <dl class="function">
  126. <dt id="celery.bin.celeryd.parse_options">
  127. <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>
  128. <dd>Parse the available options to <tt class="docutils literal"><span class="pre">celeryd</span></tt>.</dd></dl>
  129. <dl class="function">
  130. <dt id="celery.bin.celeryd.run_worker">
  131. <tt class="descclassname">celery.bin.celeryd.</tt><tt class="descname">run_worker</tt><big>(</big><em>concurrency=16</em>, <em>detach=False</em>, <em>loglevel=20</em>, <em>logfile='celeryd.log'</em>, <em>discard=False</em>, <em>pidfile='celeryd.pid'</em>, <em>umask=0</em>, <em>uid=None</em>, <em>gid=None</em>, <em>supervised=False</em>, <em>working_directory=None</em>, <em>chroot=None</em>, <em>statistics=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#celery.bin.celeryd.run_worker" title="Permalink to this definition">¶</a></dt>
  132. <dd>Starts the celery worker server.</dd></dl>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <div class="sphinxsidebar">
  138. <div class="sphinxsidebarwrapper">
  139. <h4>Previous topic</h4>
  140. <p class="topless"><a href="celery.fields.html"
  141. title="previous chapter">Django Fields - celery.fields</a></p>
  142. <h4>Next topic</h4>
  143. <p class="topless"><a href="celery.bin.celeryinit.html"
  144. title="next chapter">Celery Initialize - celery.bin.celeryinit</a></p>
  145. <h3>This Page</h3>
  146. <ul class="this-page-menu">
  147. <li><a href="../sources/reference/celery.bin.celeryd.txt"
  148. rel="nofollow">Show Source</a></li>
  149. </ul>
  150. <div id="searchbox" style="display: none">
  151. <h3>Quick search</h3>
  152. <form class="search" action="../search.html" method="get">
  153. <input type="text" name="q" size="18" />
  154. <input type="submit" value="Go" />
  155. <input type="hidden" name="check_keywords" value="yes" />
  156. <input type="hidden" name="area" value="default" />
  157. </form>
  158. <p class="searchtip" style="font-size: 90%">
  159. Enter search terms or a module, class or function name.
  160. </p>
  161. </div>
  162. <script type="text/javascript">$('#searchbox').show(0);</script>
  163. </div>
  164. </div>
  165. <div class="clearer"></div>
  166. </div>
  167. <div class="related">
  168. <h3>Navigation</h3>
  169. <ul>
  170. <li class="right" style="margin-right: 10px">
  171. <a href="../genindex.html" title="General Index"
  172. >index</a></li>
  173. <li class="right" >
  174. <a href="../modindex.html" title="Global Module Index"
  175. >modules</a> |</li>
  176. <li class="right" >
  177. <a href="celery.bin.celeryinit.html" title="Celery Initialize - celery.bin.celeryinit"
  178. >next</a> |</li>
  179. <li class="right" >
  180. <a href="celery.fields.html" title="Django Fields - celery.fields"
  181. >previous</a> |</li>
  182. <li><a href="../index.html">Celery v0.7.0 (unstable) documentation</a> &raquo;</li>
  183. <li><a href="index.html" >Module API Reference</a> &raquo;</li>
  184. </ul>
  185. </div>
  186. <div class="footer">
  187. &copy; Copyright 2009, Ask Solem.
  188. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
  189. </div>
  190. </body>
  191. </html>