celery.worker.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  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>Multiprocessing Worker - celery.worker &mdash; Celery v0.3.12 (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.3.12 (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.12 (unstable) documentation" href="../index.html" />
  21. <link rel="up" title="Module API Reference" href="index.html" />
  22. <link rel="next" title="Task Pool - celery.pool" href="celery.pool.html" />
  23. <link rel="prev" title="Statistics and Monitoring - celery.monitoring" href="celery.monitoring.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.pool.html" title="Task Pool - celery.pool"
  37. accesskey="N">next</a> |</li>
  38. <li class="right" >
  39. <a href="celery.monitoring.html" title="Statistics and Monitoring - celery.monitoring"
  40. accesskey="P">previous</a> |</li>
  41. <li><a href="../index.html">Celery v0.3.12 (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.worker">
  50. <h1>Multiprocessing Worker - celery.worker<a class="headerlink" href="#module-celery.worker" title="Permalink to this headline">¶</a></h1>
  51. <p>celery.worker</p>
  52. <dl class="class">
  53. <dt id="celery.worker.PeriodicWorkController">
  54. <em class="property">
  55. class </em><tt class="descclassname">celery.worker.</tt><tt class="descname">PeriodicWorkController</tt><a class="headerlink" href="#celery.worker.PeriodicWorkController" title="Permalink to this definition">¶</a></dt>
  56. <dd><p>A thread that continuously checks if there are
  57. <a title="celery.task.PeriodicTask" class="reference external" href="celery.task.html#celery.task.PeriodicTask"><tt class="xref docutils literal"><span class="pre">celery.task.PeriodicTask</span></tt></a> tasks waiting for execution,
  58. and executes them.</p>
  59. <p>Example:</p>
  60. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">PeriodicWorkController</span><span class="p">()</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
  61. </pre></div>
  62. </div>
  63. <dl class="method">
  64. <dt id="celery.worker.PeriodicWorkController.run">
  65. <tt class="descname">run</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.PeriodicWorkController.run" title="Permalink to this definition">¶</a></dt>
  66. <dd>Run when you use <tt class="xref docutils literal"><span class="pre">Thread.start()</span></tt></dd></dl>
  67. <dl class="method">
  68. <dt id="celery.worker.PeriodicWorkController.stop">
  69. <tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.PeriodicWorkController.stop" title="Permalink to this definition">¶</a></dt>
  70. <dd>Shutdown the thread.</dd></dl>
  71. </dd></dl>
  72. <dl class="class">
  73. <dt id="celery.worker.TaskWrapper">
  74. <em class="property">
  75. class </em><tt class="descclassname">celery.worker.</tt><tt class="descname">TaskWrapper</tt><big>(</big><em>task_name</em>, <em>task_id</em>, <em>task_func</em>, <em>args</em>, <em>kwargs</em>, <em>on_acknowledge=None</em>, <em>**opts</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper" title="Permalink to this definition">¶</a></dt>
  76. <dd><p>Class wrapping a task to be run.</p>
  77. <table class="docutils field-list" frame="void" rules="none">
  78. <col class="field-name" />
  79. <col class="field-body" />
  80. <tbody valign="top">
  81. <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  82. <li><em>task_name</em> &#8211; see <a title="celery.worker.TaskWrapper.task_name" class="reference internal" href="#celery.worker.TaskWrapper.task_name"><tt class="xref docutils literal"><span class="pre">task_name</span></tt></a>.</li>
  83. <li><em>task_id</em> &#8211; see <a title="celery.worker.TaskWrapper.task_id" class="reference internal" href="#celery.worker.TaskWrapper.task_id"><tt class="xref docutils literal"><span class="pre">task_id</span></tt></a>.</li>
  84. <li><em>task_func</em> &#8211; see <a title="celery.worker.TaskWrapper.task_func" class="reference internal" href="#celery.worker.TaskWrapper.task_func"><tt class="xref docutils literal"><span class="pre">task_func</span></tt></a></li>
  85. <li><em>args</em> &#8211; see <a title="celery.worker.TaskWrapper.args" class="reference internal" href="#celery.worker.TaskWrapper.args"><tt class="xref docutils literal"><span class="pre">args</span></tt></a></li>
  86. <li><em>kwargs</em> &#8211; see <a title="celery.worker.TaskWrapper.kwargs" class="reference internal" href="#celery.worker.TaskWrapper.kwargs"><tt class="xref docutils literal"><span class="pre">kwargs</span></tt></a>.</li>
  87. </ul>
  88. </td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. <dl class="attribute">
  93. <dt id="celery.worker.TaskWrapper.task_name">
  94. <tt class="descname">task_name</tt><a class="headerlink" href="#celery.worker.TaskWrapper.task_name" title="Permalink to this definition">¶</a></dt>
  95. <dd>Kind of task. Must be a name registered in the task registry.</dd></dl>
  96. <dl class="attribute">
  97. <dt id="celery.worker.TaskWrapper.task_id">
  98. <tt class="descname">task_id</tt><a class="headerlink" href="#celery.worker.TaskWrapper.task_id" title="Permalink to this definition">¶</a></dt>
  99. <dd>UUID of the task.</dd></dl>
  100. <dl class="attribute">
  101. <dt id="celery.worker.TaskWrapper.task_func">
  102. <tt class="descname">task_func</tt><a class="headerlink" href="#celery.worker.TaskWrapper.task_func" title="Permalink to this definition">¶</a></dt>
  103. <dd>The tasks callable object.</dd></dl>
  104. <dl class="attribute">
  105. <dt id="celery.worker.TaskWrapper.args">
  106. <tt class="descname">args</tt><a class="headerlink" href="#celery.worker.TaskWrapper.args" title="Permalink to this definition">¶</a></dt>
  107. <dd>List of positional arguments to apply to the task.</dd></dl>
  108. <dl class="attribute">
  109. <dt id="celery.worker.TaskWrapper.kwargs">
  110. <tt class="descname">kwargs</tt><a class="headerlink" href="#celery.worker.TaskWrapper.kwargs" title="Permalink to this definition">¶</a></dt>
  111. <dd>Mapping of keyword arguments to apply to the task.</dd></dl>
  112. <dl class="attribute">
  113. <dt id="celery.worker.TaskWrapper.message">
  114. <tt class="descname">message</tt><a class="headerlink" href="#celery.worker.TaskWrapper.message" title="Permalink to this definition">¶</a></dt>
  115. <dd>The original message sent. Used for acknowledging the message.</dd></dl>
  116. <dl class="method">
  117. <dt id="celery.worker.TaskWrapper.execute">
  118. <tt class="descname">execute</tt><big>(</big><em>loglevel=None</em>, <em>logfile=None</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper.execute" title="Permalink to this definition">¶</a></dt>
  119. <dd><p>Execute the task in a <a title="celery.worker.jail" class="reference internal" href="#celery.worker.jail"><tt class="xref docutils literal"><span class="pre">jail()</span></tt></a> and store return value
  120. and status in the task meta backend.</p>
  121. <table class="docutils field-list" frame="void" rules="none">
  122. <col class="field-name" />
  123. <col class="field-body" />
  124. <tbody valign="top">
  125. <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  126. <li><em>loglevel</em> &#8211; The loglevel used by the task.</li>
  127. <li><em>logfile</em> &#8211; The logfile used by the task.</li>
  128. </ul>
  129. </td>
  130. </tr>
  131. </tbody>
  132. </table>
  133. </dd></dl>
  134. <dl class="method">
  135. <dt id="celery.worker.TaskWrapper.execute_using_pool">
  136. <tt class="descname">execute_using_pool</tt><big>(</big><em>pool</em>, <em>loglevel=None</em>, <em>logfile=None</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper.execute_using_pool" title="Permalink to this definition">¶</a></dt>
  137. <dd><p>Like <a title="celery.worker.TaskWrapper.execute" class="reference internal" href="#celery.worker.TaskWrapper.execute"><tt class="xref docutils literal"><span class="pre">execute()</span></tt></a>, but using the <tt class="xref docutils literal"><span class="pre">multiprocessing</span></tt> pool.</p>
  138. <table class="docutils field-list" frame="void" rules="none">
  139. <col class="field-name" />
  140. <col class="field-body" />
  141. <tbody valign="top">
  142. <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  143. <li><em>pool</em> &#8211; A <tt class="xref docutils literal"><span class="pre">multiprocessing.Pool</span></tt> instance.</li>
  144. <li><em>loglevel</em> &#8211; The loglevel used by the task.</li>
  145. <li><em>logfile</em> &#8211; The logfile used by the task.</li>
  146. </ul>
  147. </td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <p>:returns <tt class="xref docutils literal"><span class="pre">multiprocessing.AsyncResult</span></tt> instance.</p>
  152. </dd></dl>
  153. <dl class="method">
  154. <dt id="celery.worker.TaskWrapper.extend_with_default_kwargs">
  155. <tt class="descname">extend_with_default_kwargs</tt><big>(</big><em>loglevel</em>, <em>logfile</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper.extend_with_default_kwargs" title="Permalink to this definition">¶</a></dt>
  156. <dd><p>Extend the tasks keyword arguments with standard task arguments.</p>
  157. <p>These are <tt class="docutils literal"><span class="pre">logfile</span></tt>, <tt class="docutils literal"><span class="pre">loglevel</span></tt>, <tt class="docutils literal"><span class="pre">task_id</span></tt> and <tt class="docutils literal"><span class="pre">task_name</span></tt>.</p>
  158. </dd></dl>
  159. <dl class="classmethod">
  160. <dt id="celery.worker.TaskWrapper.from_message">
  161. <em class="property">
  162. classmethod </em><tt class="descname">from_message</tt><big>(</big><em>message</em>, <em>message_data</em>, <em>logger</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper.from_message" title="Permalink to this definition">¶</a></dt>
  163. <dd><p>Create a <a title="celery.worker.TaskWrapper" class="reference internal" href="#celery.worker.TaskWrapper"><tt class="xref docutils literal"><span class="pre">TaskWrapper</span></tt></a> from a task message sent by
  164. <a title="celery.messaging.TaskPublisher" class="reference external" href="celery.messaging.html#celery.messaging.TaskPublisher"><tt class="xref docutils literal"><span class="pre">celery.messaging.TaskPublisher</span></tt></a>.</p>
  165. <table class="docutils field-list" frame="void" rules="none">
  166. <col class="field-name" />
  167. <col class="field-body" />
  168. <tbody valign="top">
  169. <tr class="field"><th class="field-name" colspan="2">Raises <a title="celery.worker.UnknownTask" class="reference internal" href="#celery.worker.UnknownTask">UnknownTask</a>:</th></tr>
  170. <tr><td>&nbsp;</td><td class="field-body">if the message does not describe a task,
  171. the message is also rejected.</td>
  172. </tr>
  173. <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><a title="celery.worker.TaskWrapper" class="reference internal" href="#celery.worker.TaskWrapper"><tt class="xref docutils literal"><span class="pre">TaskWrapper</span></tt></a> instance.</td>
  174. </tr>
  175. </tbody>
  176. </table>
  177. </dd></dl>
  178. <dl class="method">
  179. <dt id="celery.worker.TaskWrapper.on_failure">
  180. <tt class="descname">on_failure</tt><big>(</big><em>exc_info</em>, <em>meta</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper.on_failure" title="Permalink to this definition">¶</a></dt>
  181. <dd>The handler used if the task raised an exception.</dd></dl>
  182. <dl class="method">
  183. <dt id="celery.worker.TaskWrapper.on_success">
  184. <tt class="descname">on_success</tt><big>(</big><em>ret_value</em>, <em>meta</em><big>)</big><a class="headerlink" href="#celery.worker.TaskWrapper.on_success" title="Permalink to this definition">¶</a></dt>
  185. <dd>The handler used if the task was successfully processed (
  186. without raising an exception).</dd></dl>
  187. </dd></dl>
  188. <dl class="exception">
  189. <dt id="celery.worker.UnknownTask">
  190. <em class="property">
  191. exception </em><tt class="descclassname">celery.worker.</tt><tt class="descname">UnknownTask</tt><a class="headerlink" href="#celery.worker.UnknownTask" title="Permalink to this definition">¶</a></dt>
  192. <dd>Got an unknown task in the queue. The message is requeued and
  193. ignored.</dd></dl>
  194. <dl class="class">
  195. <dt id="celery.worker.WorkController">
  196. <em class="property">
  197. class </em><tt class="descclassname">celery.worker.</tt><tt class="descname">WorkController</tt><big>(</big><em>concurrency=None</em>, <em>logfile=None</em>, <em>loglevel=None</em>, <em>is_detached=False</em><big>)</big><a class="headerlink" href="#celery.worker.WorkController" title="Permalink to this definition">¶</a></dt>
  198. <dd><p>Executes tasks waiting in the task queue.</p>
  199. <table class="docutils field-list" frame="void" rules="none">
  200. <col class="field-name" />
  201. <col class="field-body" />
  202. <tbody valign="top">
  203. <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  204. <li><em>concurrency</em> &#8211; see <a title="celery.worker.WorkController.concurrency" class="reference internal" href="#celery.worker.WorkController.concurrency"><tt class="xref docutils literal"><span class="pre">concurrency</span></tt></a>.</li>
  205. <li><em>logfile</em> &#8211; see <a title="celery.worker.WorkController.logfile" class="reference internal" href="#celery.worker.WorkController.logfile"><tt class="xref docutils literal"><span class="pre">logfile</span></tt></a>.</li>
  206. <li><em>loglevel</em> &#8211; see <a title="celery.worker.WorkController.loglevel" class="reference internal" href="#celery.worker.WorkController.loglevel"><tt class="xref docutils literal"><span class="pre">loglevel</span></tt></a>.</li>
  207. </ul>
  208. </td>
  209. </tr>
  210. </tbody>
  211. </table>
  212. <dl class="attribute">
  213. <dt id="celery.worker.WorkController.concurrency">
  214. <tt class="descname">concurrency</tt><a class="headerlink" href="#celery.worker.WorkController.concurrency" title="Permalink to this definition">¶</a></dt>
  215. <dd>The number of simultaneous processes doing work (default:
  216. <a title="celery.conf.DAEMON_CONCURRENCY" class="reference external" href="celery.conf.html#celery.conf.DAEMON_CONCURRENCY"><tt class="xref docutils literal"><span class="pre">celery.conf.DAEMON_CONCURRENCY</span></tt></a>)</dd></dl>
  217. <dl class="attribute">
  218. <dt id="celery.worker.WorkController.loglevel">
  219. <tt class="descname">loglevel</tt><a class="headerlink" href="#celery.worker.WorkController.loglevel" title="Permalink to this definition">¶</a></dt>
  220. <dd>The loglevel used (default: <tt class="xref docutils literal"><span class="pre">logging.INFO</span></tt>)</dd></dl>
  221. <dl class="attribute">
  222. <dt id="celery.worker.WorkController.logfile">
  223. <tt class="descname">logfile</tt><a class="headerlink" href="#celery.worker.WorkController.logfile" title="Permalink to this definition">¶</a></dt>
  224. <dd>The logfile used, if no logfile is specified it uses <tt class="docutils literal"><span class="pre">stderr</span></tt>
  225. (default: <a title="celery.conf.DAEMON_LOG_FILE" class="reference external" href="celery.conf.html#celery.conf.DAEMON_LOG_FILE"><tt class="xref docutils literal"><span class="pre">celery.conf.DAEMON_LOG_FILE</span></tt></a>).</dd></dl>
  226. <dl class="attribute">
  227. <dt id="celery.worker.WorkController.logger">
  228. <tt class="descname">logger</tt><a class="headerlink" href="#celery.worker.WorkController.logger" title="Permalink to this definition">¶</a></dt>
  229. <dd>The <tt class="xref docutils literal"><span class="pre">logging.Logger</span></tt> instance used for logging.</dd></dl>
  230. <dl class="attribute">
  231. <dt id="celery.worker.WorkController.pool">
  232. <tt class="descname">pool</tt><a class="headerlink" href="#celery.worker.WorkController.pool" title="Permalink to this definition">¶</a></dt>
  233. <dd>The <tt class="xref docutils literal"><span class="pre">multiprocessing.Pool</span></tt> instance used.</dd></dl>
  234. <dl class="attribute">
  235. <dt id="celery.worker.WorkController.task_consumer">
  236. <tt class="descname">task_consumer</tt><a class="headerlink" href="#celery.worker.WorkController.task_consumer" title="Permalink to this definition">¶</a></dt>
  237. <dd>The <a title="celery.messaging.TaskConsumer" class="reference external" href="celery.messaging.html#celery.messaging.TaskConsumer"><tt class="xref docutils literal"><span class="pre">celery.messaging.TaskConsumer</span></tt></a> instance used.</dd></dl>
  238. <dl class="method">
  239. <dt id="celery.worker.WorkController.close_connection">
  240. <tt class="descname">close_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.WorkController.close_connection" title="Permalink to this definition">¶</a></dt>
  241. <dd>Close the AMQP connection.</dd></dl>
  242. <dl class="method">
  243. <dt id="celery.worker.WorkController.connection_diagnostics">
  244. <tt class="descname">connection_diagnostics</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.WorkController.connection_diagnostics" title="Permalink to this definition">¶</a></dt>
  245. <dd>Diagnose the AMQP connection, and reset connection if
  246. necessary.</dd></dl>
  247. <dl class="method">
  248. <dt id="celery.worker.WorkController.process_task">
  249. <tt class="descname">process_task</tt><big>(</big><em>message_data</em>, <em>message</em><big>)</big><a class="headerlink" href="#celery.worker.WorkController.process_task" title="Permalink to this definition">¶</a></dt>
  250. <dd>Process task message by passing it to the pool of workers.</dd></dl>
  251. <dl class="method">
  252. <dt id="celery.worker.WorkController.reset_connection">
  253. <tt class="descname">reset_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.WorkController.reset_connection" title="Permalink to this definition">¶</a></dt>
  254. <dd><p>Reset the AMQP connection, and reinitialize the
  255. <a title="celery.messaging.TaskConsumer" class="reference external" href="celery.messaging.html#celery.messaging.TaskConsumer"><tt class="xref docutils literal"><span class="pre">celery.messaging.TaskConsumer</span></tt></a> instance.</p>
  256. <p>Resets the task consumer in <a title="celery.worker.WorkController.task_consumer" class="reference internal" href="#celery.worker.WorkController.task_consumer"><tt class="xref docutils literal"><span class="pre">task_consumer</span></tt></a>.</p>
  257. </dd></dl>
  258. <dl class="method">
  259. <dt id="celery.worker.WorkController.run">
  260. <tt class="descname">run</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.WorkController.run" title="Permalink to this definition">¶</a></dt>
  261. <dd>Starts the workers main loop.</dd></dl>
  262. <dl class="method">
  263. <dt id="celery.worker.WorkController.shutdown">
  264. <tt class="descname">shutdown</tt><big>(</big><big>)</big><a class="headerlink" href="#celery.worker.WorkController.shutdown" title="Permalink to this definition">¶</a></dt>
  265. <dd>Make sure <tt class="docutils literal"><span class="pre">celeryd</span></tt> exits cleanly.</dd></dl>
  266. </dd></dl>
  267. <dl class="function">
  268. <dt id="celery.worker.jail">
  269. <tt class="descclassname">celery.worker.</tt><tt class="descname">jail</tt><big>(</big><em>task_id</em>, <em>task_name</em>, <em>func</em>, <em>args</em>, <em>kwargs</em><big>)</big><a class="headerlink" href="#celery.worker.jail" title="Permalink to this definition">¶</a></dt>
  270. <dd><p>Wraps the task in a jail, which catches all exceptions, and
  271. saves the status and result of the task execution to the task
  272. meta backend.</p>
  273. <p>If the call was successful, it saves the result to the task result
  274. backend, and sets the task status to <tt class="docutils literal"><span class="pre">&quot;DONE&quot;</span></tt>.</p>
  275. <p>If the call results in an exception, it saves the exception as the task
  276. result, and sets the task status to <tt class="docutils literal"><span class="pre">&quot;FAILURE&quot;</span></tt>.</p>
  277. <table class="docutils field-list" frame="void" rules="none">
  278. <col class="field-name" />
  279. <col class="field-body" />
  280. <tbody valign="top">
  281. <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  282. <li><em>task_id</em> &#8211; The id of the task.</li>
  283. <li><em>task_name</em> &#8211; The name of the task.</li>
  284. <li><em>func</em> &#8211; Callable object to execute.</li>
  285. <li><em>args</em> &#8211; List of positional args to pass on to the function.</li>
  286. <li><em>kwargs</em> &#8211; Keyword arguments mapping to pass on to the function.</li>
  287. </ul>
  288. </td>
  289. </tr>
  290. <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the function return value on success, or
  291. the exception instance on failure.</p>
  292. </td>
  293. </tr>
  294. </tbody>
  295. </table>
  296. </dd></dl>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="sphinxsidebar">
  302. <div class="sphinxsidebarwrapper">
  303. <h4>Previous topic</h4>
  304. <p class="topless"><a href="celery.monitoring.html"
  305. title="previous chapter">Statistics and Monitoring - celery.monitoring</a></p>
  306. <h4>Next topic</h4>
  307. <p class="topless"><a href="celery.pool.html"
  308. title="next chapter">Task Pool - celery.pool</a></p>
  309. <h3>This Page</h3>
  310. <ul class="this-page-menu">
  311. <li><a href="../sources/reference/celery.worker.txt"
  312. rel="nofollow">Show Source</a></li>
  313. </ul>
  314. <div id="searchbox" style="display: none">
  315. <h3>Quick search</h3>
  316. <form class="search" action="../search.html" method="get">
  317. <input type="text" name="q" size="18" />
  318. <input type="submit" value="Go" />
  319. <input type="hidden" name="check_keywords" value="yes" />
  320. <input type="hidden" name="area" value="default" />
  321. </form>
  322. <p class="searchtip" style="font-size: 90%">
  323. Enter search terms or a module, class or function name.
  324. </p>
  325. </div>
  326. <script type="text/javascript">$('#searchbox').show(0);</script>
  327. </div>
  328. </div>
  329. <div class="clearer"></div>
  330. </div>
  331. <div class="related">
  332. <h3>Navigation</h3>
  333. <ul>
  334. <li class="right" style="margin-right: 10px">
  335. <a href="../genindex.html" title="General Index"
  336. >index</a></li>
  337. <li class="right" >
  338. <a href="../modindex.html" title="Global Module Index"
  339. >modules</a> |</li>
  340. <li class="right" >
  341. <a href="celery.pool.html" title="Task Pool - celery.pool"
  342. >next</a> |</li>
  343. <li class="right" >
  344. <a href="celery.monitoring.html" title="Statistics and Monitoring - celery.monitoring"
  345. >previous</a> |</li>
  346. <li><a href="../index.html">Celery v0.3.12 (unstable) documentation</a> &raquo;</li>
  347. <li><a href="index.html" >Module API Reference</a> &raquo;</li>
  348. </ul>
  349. </div>
  350. <div class="footer">
  351. &copy; Copyright 2009, Ask Solem.
  352. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.1.
  353. </div>
  354. </body>
  355. </html>