changelog.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  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>Change history &mdash; Celery v0.3.7 (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.7 (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.7 (unstable) documentation" href="index.html" />
  21. <link rel="prev" title="Celery Worker Daemon - celery.bin.celeryd" href="reference/celery.bin.celeryd.html" />
  22. </head>
  23. <body>
  24. <div class="header-wrapper">
  25. <div class="header">
  26. <h1><a href="index.html">Celery v0.3.7 (unstable) documentation</a></h1>
  27. <div class="rel">
  28. <a href="genindex.html" title="General Index"
  29. accesskey="I">index</a> |
  30. <a href="modindex.html" title="Global Module Index"
  31. accesskey="M">modules</a> |
  32. <a href="reference/celery.bin.celeryd.html" title="Celery Worker Daemon - celery.bin.celeryd"
  33. accesskey="P">previous</a>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="content-wrapper">
  38. <div class="content">
  39. <div class="document">
  40. <div class="documentwrapper">
  41. <div class="bodywrapper">
  42. <div class="body">
  43. <div class="section" id="change-history">
  44. <h1>Change history<a class="headerlink" href="#change-history" title="Permalink to this headline">¶</a></h1>
  45. <div class="section" id="p-m-cet">
  46. <h2>0.3.7 [2008-06-16 11:41 P.M CET]<a class="headerlink" href="#p-m-cet" title="Permalink to this headline">¶</a></h2>
  47. <ul>
  48. <li><dl class="first docutils">
  49. <dt><strong>IMPORTANT</strong> Use AMQP&#8217;s <tt class="docutils literal"><span class="pre">basic.consume</span></tt> instead of <tt class="docutils literal"><span class="pre">basic.get</span></tt>.</dt>
  50. <dd><p class="first last">This means we&#8217;re no longer polling the broker for new messages.</p>
  51. </dd>
  52. </dl>
  53. </li>
  54. <li><dl class="first docutils">
  55. <dt><strong>IMPORTANT</strong> Default concurrency is now set to the number of CPU</dt>
  56. <dd><p class="first last">available on the system.</p>
  57. </dd>
  58. </dl>
  59. </li>
  60. <li><dl class="first docutils">
  61. <dt><strong>IMPORTANT</strong> <tt class="docutils literal"><span class="pre">tasks.register</span></tt>: Renamed <tt class="docutils literal"><span class="pre">task_name</span></tt> argument to</dt>
  62. <dd><p class="first"><tt class="docutils literal"><span class="pre">name</span></tt>, so</p>
  63. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">tasks</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">task_name</span><span class="o">=</span><span class="s">&quot;mytask&quot;</span><span class="p">)</span>
  64. </pre></div>
  65. </div>
  66. <p>has to be replaced with:</p>
  67. <div class="last highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">tasks</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">func</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;mytask&quot;</span><span class="p">)</span>
  68. </pre></div>
  69. </div>
  70. </dd>
  71. </dl>
  72. </li>
  73. <li><p class="first">The daemon now correctly runs if the pidlock is stale.</p>
  74. </li>
  75. <li><p class="first">Now compatible with carrot 0.5.0 (TBA)</p>
  76. </li>
  77. <li><p class="first">Default AMQP connnection timeout is now 4 seconds.</p>
  78. </li>
  79. <li><p class="first"><tt class="docutils literal"><span class="pre">AsyncResult.read()</span></tt> was always returning <tt class="xref docutils literal"><span class="pre">True</span></tt>.</p>
  80. </li>
  81. <li><dl class="first docutils">
  82. <dt>Only use README as long_description if the file exists so easy_install don&#8217;t</dt>
  83. <dd><p class="first last">break. Closes #11.</p>
  84. </dd>
  85. </dl>
  86. </li>
  87. <li><p class="first"><tt class="docutils literal"><span class="pre">celery.view</span></tt>: JSON responses now properly set its mime-type.</p>
  88. </li>
  89. <li><dl class="first docutils">
  90. <dt><tt class="docutils literal"><span class="pre">apply_async</span></tt> now has a <tt class="docutils literal"><span class="pre">connection</span></tt> keyword argument so you</dt>
  91. <dd><p class="first last">can re-use the same AMQP connection if you want to execute
  92. more than one task.</p>
  93. </dd>
  94. </dl>
  95. </li>
  96. <li><p class="first">Handle failures in task_status view such that it won&#8217;t throw 500s.</p>
  97. </li>
  98. <li><p class="first">Fixed typo <tt class="docutils literal"><span class="pre">AMQP_SERVER</span></tt> in documentation to <tt class="docutils literal"><span class="pre">AMQP_HOST</span></tt>.</p>
  99. </li>
  100. <li><p class="first">Worker exception e-mails send to admins now works properly.</p>
  101. </li>
  102. <li><dl class="first docutils">
  103. <dt>No longer depends on <tt class="docutils literal"><span class="pre">django</span></tt>, so installing <tt class="docutils literal"><span class="pre">celery</span></tt> won&#8217;t affect</dt>
  104. <dd><p class="first last">the preferred django version installed.</p>
  105. </dd>
  106. </dl>
  107. </li>
  108. <li><dl class="first docutils">
  109. <dt>Now works with PostgreSQL (psycopg2) again by registering the</dt>
  110. <dd><p class="first last"><tt class="docutils literal"><span class="pre">PickledObject</span></tt> field.</p>
  111. </dd>
  112. </dl>
  113. </li>
  114. <li><dl class="first docutils">
  115. <dt><tt class="docutils literal"><span class="pre">celeryd</span></tt>: Added <tt class="docutils literal"><span class="pre">--detach</span></tt> option as an alias to <tt class="docutils literal"><span class="pre">--daemon</span></tt>, and</dt>
  116. <dd><p class="first last">it&#8217;s the term used in the documentation from now on.</p>
  117. </dd>
  118. </dl>
  119. </li>
  120. <li><dl class="first docutils">
  121. <dt>Make sure the pool and periodic task worker thread is terminated</dt>
  122. <dd><p class="first last">properly at exit. (So <tt class="docutils literal"><span class="pre">Ctrl-C</span></tt> works again).</p>
  123. </dd>
  124. </dl>
  125. </li>
  126. <li><p class="first">Now depends on <tt class="docutils literal"><span class="pre">python-daemon</span></tt>.</p>
  127. </li>
  128. <li><p class="first">Removed dependency to <tt class="docutils literal"><span class="pre">simplejson</span></tt></p>
  129. </li>
  130. <li><dl class="first docutils">
  131. <dt>Cache Backend: Re-establishes connection for every task process</dt>
  132. <dd><p class="first last">if the Django cache backend is memcached/libmemcached.</p>
  133. </dd>
  134. </dl>
  135. </li>
  136. <li><dl class="first docutils">
  137. <dt>Tyrant Backend: Now re-establishes the connection for every task</dt>
  138. <dd><p class="first last">executed.</p>
  139. </dd>
  140. </dl>
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="section" id="id1">
  145. <h2>0.3.3 [2009-06-08 01:07 P.M CET]<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
  146. <ul>
  147. <li><dl class="first docutils">
  148. <dt>The <tt class="docutils literal"><span class="pre">PeriodicWorkController</span></tt> now sleeps for 1 second between checking</dt>
  149. <dd><p class="first last">for periodic tasks to execute.</p>
  150. </dd>
  151. </dl>
  152. </li>
  153. </ul>
  154. </div>
  155. <div class="section" id="id2">
  156. <h2>0.3.2 [2009-06-08 01:07 P.M CET]<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
  157. <ul>
  158. <li><dl class="first docutils">
  159. <dt>celeryd: Added option <tt class="docutils literal"><span class="pre">--discard</span></tt>: Discard (delete!) all waiting</dt>
  160. <dd><p class="first last">messages in the queue.</p>
  161. </dd>
  162. </dl>
  163. </li>
  164. <li><p class="first">celeryd: The <tt class="docutils literal"><span class="pre">--wakeup-after</span></tt> option was not handled as a float.</p>
  165. </li>
  166. </ul>
  167. </div>
  168. <div class="section" id="id3">
  169. <h2>0.3.1 [2009-06-08 01:07 P.M CET]<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
  170. <ul>
  171. <li><dl class="first docutils">
  172. <dt>The <cite>PeriodicTask`</cite> worker is now running in its own thread instead</dt>
  173. <dd><p class="first last">of blocking the <tt class="docutils literal"><span class="pre">TaskController</span></tt> loop.</p>
  174. </dd>
  175. </dl>
  176. </li>
  177. <li><p class="first">Default <tt class="docutils literal"><span class="pre">QUEUE_WAKEUP_AFTER</span></tt> has been lowered to <tt class="docutils literal"><span class="pre">0.1</span></tt> (was <tt class="docutils literal"><span class="pre">0.3</span></tt>)</p>
  178. </li>
  179. </ul>
  180. </div>
  181. <div class="section" id="id4">
  182. <h2>0.3.0 [2009-06-08 12:41 P.M CET]<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
  183. <p><strong>NOTE</strong> This is a development version, for the stable release, please
  184. see versions 0.2.x.</p>
  185. <p><strong>VERY IMPORTANT:</strong> Pickle is now the encoder used for serializing task
  186. arguments, so be sure to flush your task queue before you upgrade.</p>
  187. <ul>
  188. <li><dl class="first docutils">
  189. <dt><strong>IMPORTANT</strong> TaskSet.run() now returns a celery.result.TaskSetResult</dt>
  190. <dd><p class="first last">instance, which lets you inspect the status and return values of a
  191. taskset as it was a single entity.</p>
  192. </dd>
  193. </dl>
  194. </li>
  195. <li><p class="first"><strong>IMPORTANT</strong> Celery now depends on carrot &gt;= 0.4.1.</p>
  196. </li>
  197. <li><dl class="first docutils">
  198. <dt>The celery daemon now sends task errors to the registered admin e-mails.</dt>
  199. <dd><p class="first last">To turn off this feature, set <tt class="docutils literal"><span class="pre">SEND_CELERY_TASK_ERROR_EMAILS</span></tt> to
  200. <tt class="xref docutils literal"><span class="pre">False</span></tt> in your <tt class="docutils literal"><span class="pre">settings.py</span></tt>. Thanks to Grégoire Cachet.</p>
  201. </dd>
  202. </dl>
  203. </li>
  204. <li><p class="first">You can now run the celery daemon by using <tt class="docutils literal"><span class="pre">manage.py</span></tt>:</p>
  205. <div class="highlight-python"><pre> $ python manage.py celeryd
  206. Thanks to Grégoire Cachet.</pre>
  207. </div>
  208. </li>
  209. <li><dl class="first docutils">
  210. <dt>Added support for message priorities, topic exchanges, custom routing</dt>
  211. <dd><p class="first">keys for tasks. This means we have introduced
  212. <tt class="docutils literal"><span class="pre">celery.task.apply_async</span></tt>, a new way of executing tasks.</p>
  213. <p>You can use <tt class="docutils literal"><span class="pre">celery.task.delay</span></tt> and <tt class="docutils literal"><span class="pre">celery.Task.delay</span></tt> like usual, but
  214. if you want greater control over the message sent, you want
  215. <tt class="docutils literal"><span class="pre">celery.task.apply_async</span></tt> and <tt class="docutils literal"><span class="pre">celery.Task.apply_async</span></tt>.</p>
  216. <p>This also means the AMQP configuration has changed. Some settings has
  217. been renamed, while others are new:</p>
  218. <div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_AMQP_EXCHANGE</span>
  219. <span class="n">CELERY_AMQP_PUBLISHER_ROUTING_KEY</span>
  220. <span class="n">CELERY_AMQP_CONSUMER_ROUTING_KEY</span>
  221. <span class="n">CELERY_AMQP_CONSUMER_QUEUE</span>
  222. <span class="n">CELERY_AMQP_EXCHANGE_TYPE</span>
  223. </pre></div>
  224. </div>
  225. <p class="last">See the entry <a class="reference external" href="http://bit.ly/celery_AMQP_routing">Can I send some tasks to only some servers?</a> in the
  226. <a class="reference external" href="http://ask.github.com/celery/faq.html">FAQ</a> for more information.</p>
  227. </dd>
  228. </dl>
  229. </li>
  230. </ul>
  231. <ul>
  232. <li><dl class="first docutils">
  233. <dt>Task errors are now logged using loglevel <tt class="docutils literal"><span class="pre">ERROR</span></tt> instead of <tt class="docutils literal"><span class="pre">INFO</span></tt>,</dt>
  234. <dd><p class="first last">and backtraces are dumped. Thanks to Grégoire Cachet.</p>
  235. </dd>
  236. </dl>
  237. </li>
  238. <li><dl class="first docutils">
  239. <dt>Make every new worker process re-establish it&#8217;s Django DB connection,</dt>
  240. <dd><p class="first last">this solving the &#8220;MySQL connection died?&#8221; exceptions.
  241. Thanks to Vitaly Babiy and Jirka Vejrazka.</p>
  242. </dd>
  243. </dl>
  244. </li>
  245. <li><dl class="first docutils">
  246. <dt><strong>IMOPORTANT</strong> Now using pickle to encode task arguments. This means you</dt>
  247. <dd><p class="first last">now can pass complex python objects to tasks as arguments.</p>
  248. </dd>
  249. </dl>
  250. </li>
  251. <li><p class="first">Removed dependency on <tt class="docutils literal"><span class="pre">yadayada</span></tt>.</p>
  252. </li>
  253. <li><p class="first">Added a FAQ, see <tt class="docutils literal"><span class="pre">docs/faq.rst</span></tt>.</p>
  254. </li>
  255. <li><dl class="first docutils">
  256. <dt>Now converts any unicode keys in task <tt class="docutils literal"><span class="pre">kwargs</span></tt> to regular strings.</dt>
  257. <dd><p class="first last">Thanks Vitaly Babiy.</p>
  258. </dd>
  259. </dl>
  260. </li>
  261. <li><p class="first">Renamed the <tt class="docutils literal"><span class="pre">TaskDaemon</span></tt> to <tt class="docutils literal"><span class="pre">WorkController</span></tt>.</p>
  262. </li>
  263. <li><dl class="first docutils">
  264. <dt><tt class="docutils literal"><span class="pre">celery.datastructures.TaskProcessQueue</span></tt> is now renamed to</dt>
  265. <dd><p class="first last"><tt class="docutils literal"><span class="pre">celery.pool.TaskPool</span></tt>.</p>
  266. </dd>
  267. </dl>
  268. </li>
  269. <li><dl class="first docutils">
  270. <dt>The pool algorithm has been refactored for greater performance and</dt>
  271. <dd><p class="first last">stability.</p>
  272. </dd>
  273. </dl>
  274. </li>
  275. </ul>
  276. </div>
  277. <div class="section" id="id5">
  278. <h2>0.2.0 [2009-05-20 05:14 P.M CET]<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
  279. <ul class="simple">
  280. <li>Final release of 0.2.0</li>
  281. <li>Compatible with carrot version 0.4.0.</li>
  282. <li>Fixes some syntax errors related to fetching results
  283. from the database backend.</li>
  284. </ul>
  285. </div>
  286. <div class="section" id="pre3-2009-05-20-05-14-p-m-cet">
  287. <h2>0.2.0-pre3 [2009-05-20 05:14 P.M CET]<a class="headerlink" href="#pre3-2009-05-20-05-14-p-m-cet" title="Permalink to this headline">¶</a></h2>
  288. <ul>
  289. <li><dl class="first docutils">
  290. <dt><em>Internal release</em>. Improved handling of unpickled exceptions,</dt>
  291. <dd><p class="first last">get_result() now tries to recreate something looking like the
  292. original exception.</p>
  293. </dd>
  294. </dl>
  295. </li>
  296. </ul>
  297. </div>
  298. <div class="section" id="pre2-2009-05-20-01-56-p-m-cet">
  299. <h2>0.2.0-pre2 [2009-05-20 01:56 P.M CET]<a class="headerlink" href="#pre2-2009-05-20-01-56-p-m-cet" title="Permalink to this headline">¶</a></h2>
  300. <ul class="simple">
  301. <li>Now handles unpickleable exceptions (like the dynimically generated
  302. subclasses of <tt class="docutils literal"><span class="pre">django.core.exception.MultipleObjectsReturned</span></tt>).</li>
  303. </ul>
  304. </div>
  305. <div class="section" id="pre1-2009-05-20-12-33-p-m-cet">
  306. <h2>0.2.0-pre1 [2009-05-20 12:33 P.M CET]<a class="headerlink" href="#pre1-2009-05-20-12-33-p-m-cet" title="Permalink to this headline">¶</a></h2>
  307. <ul class="simple">
  308. <li>It&#8217;s getting quite stable, with a lot of new features, so bump
  309. version to 0.2. This is a pre-release.</li>
  310. <li><tt class="docutils literal"><span class="pre">celery.task.mark_as_read()</span></tt> and <tt class="docutils literal"><span class="pre">celery.task.mark_as_failure()</span></tt> has
  311. been removed. Use <tt class="docutils literal"><span class="pre">celery.backends.default_backend.mark_as_read()</span></tt>,
  312. and <tt class="docutils literal"><span class="pre">celery.backends.default_backend.mark_as_failure()</span></tt> instead.</li>
  313. </ul>
  314. </div>
  315. <div class="section" id="id6">
  316. <h2>0.1.15 [2009-05-19 04:13 P.M CET]<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
  317. <ul class="simple">
  318. <li>The celery daemon was leaking AMQP connections, this should be fixed,
  319. if you have any problems with too many files open (like <tt class="docutils literal"><span class="pre">emfile</span></tt>
  320. errors in <tt class="docutils literal"><span class="pre">rabbit.log</span></tt>, please contact us!</li>
  321. </ul>
  322. </div>
  323. <div class="section" id="id7">
  324. <h2>0.1.14 [2009-05-19 01:08 P.M CET]<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
  325. <ul class="simple">
  326. <li>Fixed a syntax error in the <tt class="docutils literal"><span class="pre">TaskSet</span></tt> class. (No such variable
  327. <tt class="docutils literal"><span class="pre">TimeOutError</span></tt>).</li>
  328. </ul>
  329. </div>
  330. <div class="section" id="id8">
  331. <h2>0.1.13 [2009-05-19 12:36 P.M CET]<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
  332. <ul>
  333. <li><p class="first">Forgot to add <tt class="docutils literal"><span class="pre">yadayada</span></tt> to install requirements.</p>
  334. </li>
  335. <li><p class="first">Now deletes all expired task results, not just those marked as done.</p>
  336. </li>
  337. <li><p class="first">Able to load the Tokyo Tyrant backend class without django
  338. configuration, can specify tyrant settings directly in the class
  339. constructor.</p>
  340. </li>
  341. <li><p class="first">Improved API documentation</p>
  342. </li>
  343. <li><p class="first">Now using the Sphinx documentation system, you can build
  344. the html documentation by doing</p>
  345. <div class="highlight-python"><pre>$ cd docs
  346. $ make html</pre>
  347. </div>
  348. <p>and the result will be in <tt class="docutils literal"><span class="pre">docs/.build/html</span></tt>.</p>
  349. </li>
  350. </ul>
  351. </div>
  352. <div class="section" id="id9">
  353. <h2>0.1.12 [2009-05-18 04:38 P.M CET]<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h2>
  354. <ul>
  355. <li><p class="first"><tt class="docutils literal"><span class="pre">delay_task()</span></tt> etc. now returns <tt class="docutils literal"><span class="pre">celery.task.AsyncResult</span></tt> object,
  356. which lets you check the result and any failure that might have
  357. happened. It kind of works like the <tt class="docutils literal"><span class="pre">multiprocessing.AsyncResult</span></tt>
  358. class returned by <tt class="docutils literal"><span class="pre">multiprocessing.Pool.map_async</span></tt>.</p>
  359. </li>
  360. <li><p class="first">Added dmap() and dmap_async(). This works like the
  361. <tt class="docutils literal"><span class="pre">multiprocessing.Pool</span></tt> versions except they are tasks
  362. distributed to the celery server. Example:</p>
  363. <blockquote>
  364. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">dmap</span>
  365. <span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">operator</span>
  366. <span class="gp">&gt;&gt;&gt; </span><span class="n">dmap</span><span class="p">(</span><span class="n">operator</span><span class="o">.</span><span class="n">add</span><span class="p">,</span> <span class="p">[[</span><span class="mf">2</span><span class="p">,</span> <span class="mf">2</span><span class="p">],</span> <span class="p">[</span><span class="mf">4</span><span class="p">,</span> <span class="mf">4</span><span class="p">],</span> <span class="p">[</span><span class="mf">8</span><span class="p">,</span> <span class="mf">8</span><span class="p">]])</span>
  367. <span class="gp">&gt;&gt;&gt; </span><span class="p">[</span><span class="mf">4</span><span class="p">,</span> <span class="mf">8</span><span class="p">,</span> <span class="mf">16</span><span class="p">]</span>
  368. </pre></div>
  369. </div>
  370. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">dmap_async</span>
  371. <span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">operator</span>
  372. <span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">dmap_async</span><span class="p">(</span><span class="n">operator</span><span class="o">.</span><span class="n">add</span><span class="p">,</span> <span class="p">[[</span><span class="mf">2</span><span class="p">,</span> <span class="mf">2</span><span class="p">],</span> <span class="p">[</span><span class="mf">4</span><span class="p">,</span> <span class="mf">4</span><span class="p">],</span> <span class="p">[</span><span class="mf">8</span><span class="p">,</span> <span class="mf">8</span><span class="p">]])</span>
  373. <span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">ready</span><span class="p">()</span>
  374. <span class="go">False</span>
  375. <span class="gp">&gt;&gt;&gt; </span><span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
  376. <span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">ready</span><span class="p">()</span>
  377. <span class="go">True</span>
  378. <span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="o">.</span><span class="n">result</span>
  379. <span class="go">[4, 8, 16]</span>
  380. </pre></div>
  381. </div>
  382. </blockquote>
  383. </li>
  384. <li><p class="first">Refactored the task metadata cache and database backends, and added a new backend for Tokyo Tyrant. You can set the backend in your django settings file. e.g</p>
  385. <blockquote>
  386. <p>CELERY_BACKEND = &#8220;database&#8221;; # Uses the database</p>
  387. <p>CELERY_BACKEND = &#8220;cache&#8221;; # Uses the django cache framework</p>
  388. <p>CELERY_BACKEND = &#8220;tyrant&#8221;; # Uses Tokyo Tyrant
  389. TT_HOST = &#8220;localhost&#8221;; # Hostname for the Tokyo Tyrant server.
  390. TT_PORT = 6657; # Port of the Tokyo Tyrant server.</p>
  391. </blockquote>
  392. </li>
  393. </ul>
  394. </div>
  395. <div class="section" id="id10">
  396. <h2>0.1.11 [2009-05-12 02:08 P.M CET]<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
  397. <ul class="simple">
  398. <li>The logging system was leaking file descriptors, resulting in
  399. servers stopping with the EMFILES (too many open files) error. (fixed)</li>
  400. </ul>
  401. </div>
  402. <div class="section" id="id11">
  403. <h2>0.1.10 [2009-05-11 12:46 P.M CET]<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h2>
  404. <ul class="simple">
  405. <li>Tasks now supports both positional arguments and keyword arguments.</li>
  406. <li>Requires carrot 0.3.8.</li>
  407. <li>The daemon now tries to reconnect if the connection is lost.</li>
  408. </ul>
  409. </div>
  410. <div class="section" id="id12">
  411. <h2>0.1.8 [2009-05-07 12:27 P.M CET]<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h2>
  412. <ul class="simple">
  413. <li>Better test coverage</li>
  414. <li>More documentation</li>
  415. <li>celeryd doesn&#8217;t emit <tt class="docutils literal"><span class="pre">Queue</span> <span class="pre">is</span> <span class="pre">empty</span></tt> message if
  416. <tt class="docutils literal"><span class="pre">settings.CELERYD_EMPTY_MSG_EMIT_EVERY</span></tt> is 0.</li>
  417. </ul>
  418. </div>
  419. <div class="section" id="id13">
  420. <h2>0.1.7 [2009-04-30 1:50 P.M CET]<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h2>
  421. <ul class="simple">
  422. <li>Added some unittests</li>
  423. <li>Can now use the database for task metadata (like if the task has
  424. been executed or not). Set <tt class="docutils literal"><span class="pre">settings.CELERY_TASK_META</span></tt></li>
  425. <li>Can now run <tt class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">test</span></tt> to run the unittests from
  426. within the <tt class="docutils literal"><span class="pre">testproj</span></tt> project.</li>
  427. <li>Can set the AMQP exchange/routing key/queue using
  428. <tt class="docutils literal"><span class="pre">settings.CELERY_AMQP_EXCHANGE</span></tt>, <tt class="docutils literal"><span class="pre">settings.CELERY_AMQP_ROUTING_KEY</span></tt>,
  429. and <tt class="docutils literal"><span class="pre">settings.CELERY_AMQP_CONSUMER_QUEUE</span></tt>.</li>
  430. </ul>
  431. </div>
  432. <div class="section" id="id14">
  433. <h2>0.1.6 [2009-04-28 2:13 P.M CET]<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h2>
  434. <blockquote>
  435. <ul class="simple">
  436. <li>Introducing <tt class="docutils literal"><span class="pre">TaskSet</span></tt>. A set of subtasks is executed and you can
  437. find out how many, or if all them, are done (excellent for progress bars and such)</li>
  438. <li>Now catches all exceptions when running <tt class="docutils literal"><span class="pre">Task.__call__</span></tt>, so the
  439. daemon doesn&#8217;t die. This does&#8217;t happen for pure functions yet, only
  440. <tt class="docutils literal"><span class="pre">Task</span></tt> classes.</li>
  441. <li><tt class="docutils literal"><span class="pre">autodiscover()</span></tt> now works with zipped eggs.</li>
  442. <li>celeryd: Now adds curernt working directory to <tt class="docutils literal"><span class="pre">sys.path</span></tt> for
  443. convenience.</li>
  444. <li>The <tt class="docutils literal"><span class="pre">run_every</span></tt> attribute of <tt class="docutils literal"><span class="pre">PeriodicTask</span></tt> classes can now be a
  445. <tt class="docutils literal"><span class="pre">datetime.timedelta()</span></tt> object.</li>
  446. <li>celeryd: You can now set the <tt class="docutils literal"><span class="pre">DJANGO_PROJECT_DIR</span></tt> variable
  447. for <tt class="docutils literal"><span class="pre">celeryd</span></tt> and it will add that to <tt class="docutils literal"><span class="pre">sys.path</span></tt> for easy launching.</li>
  448. <li>Can now check if a task has been executed or not via HTTP.</li>
  449. </ul>
  450. <p>You can do this by including the celery <tt class="docutils literal"><span class="pre">urls.py</span></tt> into your project,</p>
  451. <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">url</span><span class="p">(</span><span class="s">r&#39;^celery/$&#39;</span><span class="p">,</span> <span class="n">include</span><span class="p">(</span><span class="s">&quot;celery.urls&quot;</span><span class="p">))</span>
  452. </pre></div>
  453. </div>
  454. <p>then visiting the following url,:</p>
  455. <div class="highlight-python"><pre>http://mysite/celery/$task_id/done/</pre>
  456. </div>
  457. <p>this will return a JSON dictionary like e.g:</p>
  458. <div class="highlight-python"><pre>&gt;&gt;&gt; {"task": {"id": $task_id, "executed": true}}</pre>
  459. </div>
  460. <ul class="simple">
  461. <li><tt class="docutils literal"><span class="pre">delay_task</span></tt> now returns string id, not <tt class="docutils literal"><span class="pre">uuid.UUID</span></tt> instance.</li>
  462. <li>Now has <tt class="docutils literal"><span class="pre">PeriodicTasks</span></tt>, to have <tt class="docutils literal"><span class="pre">cron</span></tt> like functionality.</li>
  463. <li>Project changed name from <tt class="docutils literal"><span class="pre">crunchy</span></tt> to <tt class="docutils literal"><span class="pre">celery</span></tt>. The details of
  464. the name change request is in <tt class="docutils literal"><span class="pre">docs/name_change_request.txt</span></tt>.</li>
  465. </ul>
  466. </blockquote>
  467. </div>
  468. <div class="section" id="a-m-cet">
  469. <h2>0.1.0 [2009-04-24 11:28 A.M CET]<a class="headerlink" href="#a-m-cet" title="Permalink to this headline">¶</a></h2>
  470. <ul class="simple">
  471. <li>Initial release</li>
  472. </ul>
  473. </div>
  474. </div>
  475. </div>
  476. </div>
  477. </div>
  478. </div>
  479. <div class="sidebar">
  480. <h3>Contents</h3>
  481. <ul class="current">
  482. <li class="toctree-l1"><a class="reference external" href="introduction.html">celery - Distributed Task Queue for Django.</a></li>
  483. <li class="toctree-l1"><a class="reference external" href="faq.html">Frequently Asked Questions</a></li>
  484. <li class="toctree-l1"><a class="reference external" href="reference/index.html">Module API Reference</a></li>
  485. <li class="toctree-l1 current"><a class="current reference external" href="">Change history</a><ul>
  486. <li class="toctree-l2"><a class="reference external" href="#p-m-cet">0.3.7 [2008-06-16 11:41 P.M CET]</a></li>
  487. <li class="toctree-l2"><a class="reference external" href="#id1">0.3.3 [2009-06-08 01:07 P.M CET]</a></li>
  488. <li class="toctree-l2"><a class="reference external" href="#id2">0.3.2 [2009-06-08 01:07 P.M CET]</a></li>
  489. <li class="toctree-l2"><a class="reference external" href="#id3">0.3.1 [2009-06-08 01:07 P.M CET]</a></li>
  490. <li class="toctree-l2"><a class="reference external" href="#id4">0.3.0 [2009-06-08 12:41 P.M CET]</a></li>
  491. <li class="toctree-l2"><a class="reference external" href="#id5">0.2.0 [2009-05-20 05:14 P.M CET]</a></li>
  492. <li class="toctree-l2"><a class="reference external" href="#pre3-2009-05-20-05-14-p-m-cet">0.2.0-pre3 [2009-05-20 05:14 P.M CET]</a></li>
  493. <li class="toctree-l2"><a class="reference external" href="#pre2-2009-05-20-01-56-p-m-cet">0.2.0-pre2 [2009-05-20 01:56 P.M CET]</a></li>
  494. <li class="toctree-l2"><a class="reference external" href="#pre1-2009-05-20-12-33-p-m-cet">0.2.0-pre1 [2009-05-20 12:33 P.M CET]</a></li>
  495. <li class="toctree-l2"><a class="reference external" href="#id6">0.1.15 [2009-05-19 04:13 P.M CET]</a></li>
  496. <li class="toctree-l2"><a class="reference external" href="#id7">0.1.14 [2009-05-19 01:08 P.M CET]</a></li>
  497. <li class="toctree-l2"><a class="reference external" href="#id8">0.1.13 [2009-05-19 12:36 P.M CET]</a></li>
  498. <li class="toctree-l2"><a class="reference external" href="#id9">0.1.12 [2009-05-18 04:38 P.M CET]</a></li>
  499. <li class="toctree-l2"><a class="reference external" href="#id10">0.1.11 [2009-05-12 02:08 P.M CET]</a></li>
  500. <li class="toctree-l2"><a class="reference external" href="#id11">0.1.10 [2009-05-11 12:46 P.M CET]</a></li>
  501. <li class="toctree-l2"><a class="reference external" href="#id12">0.1.8 [2009-05-07 12:27 P.M CET]</a></li>
  502. <li class="toctree-l2"><a class="reference external" href="#id13">0.1.7 [2009-04-30 1:50 P.M CET]</a></li>
  503. <li class="toctree-l2"><a class="reference external" href="#id14">0.1.6 [2009-04-28 2:13 P.M CET]</a></li>
  504. <li class="toctree-l2"><a class="reference external" href="#a-m-cet">0.1.0 [2009-04-24 11:28 A.M CET]</a></li>
  505. </ul>
  506. </li>
  507. </ul>
  508. <h3 style="margin-top: 1.5em;">Search</h3>
  509. <form class="search" action="search.html" method="get">
  510. <input type="text" name="q" size="18" />
  511. <input type="submit" value="Go" />
  512. <input type="hidden" name="check_keywords" value="yes" />
  513. <input type="hidden" name="area" value="default" />
  514. </form>
  515. <p class="searchtip" style="font-size: 90%">
  516. Enter search terms or a module, class or function name.
  517. </p>
  518. </div>
  519. <div class="clearer"></div>
  520. </div>
  521. </div>
  522. <div class="footer-wrapper">
  523. <div class="footer">
  524. <div class="left">
  525. <a href="genindex.html" title="General Index"
  526. >index</a> |
  527. <a href="modindex.html" title="Global Module Index"
  528. >modules</a> |
  529. <a href="reference/celery.bin.celeryd.html" title="Celery Worker Daemon - celery.bin.celeryd"
  530. >previous</a>
  531. <br/>
  532. <a href="sources/changelog.txt"
  533. rel="nofollow">Show Source</a>
  534. </div>
  535. <div class="right">
  536. &copy; Copyright 2009, Ask Solem.<br/>
  537. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.1.
  538. </div>
  539. <div class="clearer"></div>
  540. </div>
  541. </div>
  542. </body>
  543. </html>