changelog.html 38 KB

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