123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>Change history — Celery v0.7.0 (unstable) documentation</title>
- <link rel="stylesheet" href="static/nature.css" type="text/css" />
- <link rel="stylesheet" href="static/pygments.css" type="text/css" />
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '',
- VERSION: '0.7.0 (unstable)',
- COLLAPSE_MODINDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="static/jquery.js"></script>
- <script type="text/javascript" src="static/doctools.js"></script>
- <link rel="top" title="Celery v0.7.0 (unstable) documentation" href="index.html" />
- <link rel="next" title="Interesting Links" href="links.html" />
- <link rel="prev" title="Celery Initialize - celery.bin.celeryinit" href="reference/celery.bin.celeryinit.html" />
- </head>
- <body>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="modindex.html" title="Global Module Index"
- accesskey="M">modules</a> |</li>
- <li class="right" >
- <a href="links.html" title="Interesting Links"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="reference/celery.bin.celeryinit.html" title="Celery Initialize - celery.bin.celeryinit"
- accesskey="P">previous</a> |</li>
- <li><a href="index.html">Celery v0.7.0 (unstable) documentation</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body">
-
- <div class="section" id="change-history">
- <h1>Change history<a class="headerlink" href="#change-history" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="a-m-cet">
- <h2>0.6.0 [2009-08-07 06:54 A.M CET]<a class="headerlink" href="#a-m-cet" title="Permalink to this headline">¶</a></h2>
- <p><strong>IMPORTANT CHANGES</strong></p>
- <ul>
- <li><dl class="first docutils">
- <dt>Fixed a bug where tasks raising unpickleable exceptions crashed pool</dt>
- <dd><p class="first last">workers. So if you’ve had pool workers mysteriously dissapearing, or
- problems with celeryd stopping working, this has been fixed in this
- version.</p>
- </dd>
- </dl>
- </li>
- <li><p class="first">Fixed a race condition with periodic tasks.</p>
- </li>
- <li><dl class="first docutils">
- <dt>The task pool is now supervised, so if a pool worker crashes,</dt>
- <dd><p class="first last">goes away or stops responding, it is automatically replaced with
- a new one.</p>
- </dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt>Task.name is now automatically generated out of class module+name, e.g.</dt>
- <dd><p class="first last"><tt class="docutils literal"><span class="pre">"djangotwitter.tasks.UpdateStatusesTask"</span></tt>. Very convenient. No idea why
- we didn’t do this before. Some documentation is updated to not manually
- specify a task name.</p>
- </dd>
- </dl>
- </li>
- </ul>
- <p><strong>NEWS</strong></p>
- <ul>
- <li><p class="first">Tested with Django 1.1</p>
- </li>
- <li><p class="first">New Tutorial: Creating a click counter using carrot and celery</p>
- </li>
- <li><dl class="first docutils">
- <dt>Database entries for periodic tasks are now created at <tt class="docutils literal"><span class="pre">celeryd</span></tt></dt>
- <dd><p class="first last">startup instead of for each check (which has been a forgotten TODO/XXX
- in the code for a long time)</p>
- </dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt>New settings variable: <tt class="docutils literal"><span class="pre">CELERY_TASK_RESULT_EXPIRES</span></tt></dt>
- <dd><p class="first last">Time (in seconds, or a <cite>datetime.timedelta</cite> object) for when after
- stored task results are deleted. For the moment this only works for the
- database backend.</p>
- </dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt><tt class="docutils literal"><span class="pre">celeryd</span></tt> now emits a debug log message for which periodic tasks</dt>
- <dd><p class="first last">has been launched.</p>
- </dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt>The periodic task table is now locked for reading while getting</dt>
- <dd><p class="first last">periodic task status. (MySQL only so far, seeking patches for other
- engines)</p>
- </dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt>A lot more debugging information is now available by turning on the</dt>
- <dd><p class="first last"><tt class="docutils literal"><span class="pre">DEBUG</span></tt> loglevel (<tt class="docutils literal"><span class="pre">--loglevel=DEBUG</span></tt>).</p>
- </dd>
- </dl>
- </li>
- <li><p class="first">Functions/methods with a timeout argument now works correctly.</p>
- </li>
- <li><dl class="first docutils">
- <dt>New: <tt class="docutils literal"><span class="pre">celery.strategy.even_time_distribution</span></tt>:</dt>
- <dd><p class="first last">With an iterator yielding task args, kwargs tuples, evenly distribute
- the processing of its tasks throughout the time window available.</p>
- </dd>
- </dl>
- </li>
- <li><p class="first">Log message <tt class="docutils literal"><span class="pre">Unknown</span> <span class="pre">task</span> <span class="pre">ignored...</span></tt> now has loglevel <tt class="docutils literal"><span class="pre">ERROR</span></tt></p>
- </li>
- <li><dl class="first docutils">
- <dt>Log message <tt class="docutils literal"><span class="pre">"Got</span> <span class="pre">task</span> <span class="pre">from</span> <span class="pre">broker"</span></tt> is now emitted for all tasks, even if</dt>
- <dd><p class="first last">the task has an ETA (estimated time of arrival). Also the message now
- includes the ETA for the task (if any).</p>
- </dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt>Acknowledgement now happens in the pool callback. Can’t do ack in the job</dt>
- <dd><p class="first last">target, as it’s not pickleable (can’t share AMQP connection, etc)).</p>
- </dd>
- </dl>
- </li>
- <li><p class="first">Added note about .delay hanging in README</p>
- </li>
- <li><p class="first">Tests now passing in Django 1.1</p>
- </li>
- <li><p class="first">Fixed discovery to make sure app is in INSTALLED_APPS</p>
- </li>
- <li><dl class="first docutils">
- <dt>Previously overrided pool behaviour (process reap, wait until pool worker</dt>
- <dd><p class="first last">available, etc.) is now handled by <tt class="docutils literal"><span class="pre">multiprocessing.Pool</span></tt> itself.</p>
- </dd>
- </dl>
- </li>
- <li><p class="first">Convert statistics data to unicode for use as kwargs. Thanks Lucy!</p>
- </li>
- </ul>
- </div>
- <div class="section" id="p-m-cet">
- <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>
- <ul class="simple">
- <li>Fixed a bug with parsing the message options (<tt class="docutils literal"><span class="pre">mandatory</span></tt>,
- <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>
- </ul>
- </div>
- <div class="section" id="id1">
- <h2>0.4.0 [2009-07-01 07:29 P.M CET]<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Adds eager execution. <tt class="docutils literal"><span class="pre">celery.execute.apply``|``Task.apply</span></tt> executes the
- function blocking until the task is done, for API compatiblity it
- returns an <tt class="docutils literal"><span class="pre">celery.result.EagerResult</span></tt> instance. You can configure
- celery to always run tasks locally by setting the
- <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>
- <li>Now depends on <tt class="docutils literal"><span class="pre">anyjson</span></tt>.</li>
- <li>99% coverage using python <tt class="docutils literal"><span class="pre">coverage</span></tt> 3.0.</li>
- </ul>
- </div>
- <div class="section" id="id2">
- <h2>0.3.20 [2009-06-25 08:42 P.M CET]<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
- <ul>
- <li><p class="first">New arguments to <tt class="docutils literal"><span class="pre">apply_async</span></tt> (the advanced version of
- <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>
- <blockquote>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="c"># Run 10 seconds into the future.</span>
- <span class="gp">>>> </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>
- </pre></div>
- </div>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="c"># Run 1 day from now</span>
- <span class="gp">>>> </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>
- <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>
- </pre></div>
- </div>
- </blockquote>
- </li>
- <li><p class="first">Now unlinks the pidfile if it’s stale.</p>
- </li>
- <li><p class="first">Lots of more tests.</p>
- </li>
- <li><p class="first">Now compatible with carrot >= 0.5.0.</p>
- </li>
- <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>
- instance has been removed. To get this information instead use:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </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>
- </pre></div>
- </div>
- </li>
- <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>
- </li>
- <li><p class="first">Task: Add attribute <tt class="docutils literal"><span class="pre">ignore_result</span></tt>: Don’t store the status and
- return value. This means you can’t use the
- <tt class="docutils literal"><span class="pre">celery.result.AsyncResult</span></tt> to check if the task is
- done, or get its return value. Only use if you need the performance
- and is able live without these features. Any exceptions raised will
- store the return value/status as usual.</p>
- </li>
- <li><p class="first">Task: Add attribute <tt class="docutils literal"><span class="pre">disable_error_emails</span></tt> to disable sending error
- emails for that task.</p>
- </li>
- <li><p class="first">Should now work on Windows (although running in the background won’t
- work, so using the <tt class="docutils literal"><span class="pre">--detach</span></tt> argument results in an exception
- being raised.)</p>
- </li>
- <li><p class="first">Added support for statistics for profiling and monitoring.
- To start sending statistics start <tt class="docutils literal"><span class="pre">celeryd</span></tt> with the
- <tt class="docutils literal"><span class="pre">--statistics</span></tt> option. Then after a while you can dump the results
- by running <tt class="docutils literal"><span class="pre">python</span> <span class="pre">manage.py</span> <span class="pre">celerystats</span></tt>. See
- <tt class="docutils literal"><span class="pre">celery.monitoring</span></tt> for more information.</p>
- </li>
- <li><p class="first">The celery daemon can now be supervised (i.e it is automatically
- restarted if it crashes). To use this start celeryd with the
- <tt class="docutils literal"><span class="pre">--supervised</span></tt> option (or alternatively <tt class="docutils literal"><span class="pre">-S</span></tt>).</p>
- </li>
- <li><p class="first">views.apply: View applying a task. Example:</p>
- <div class="highlight-python"><pre>http://e.com/celery/apply/task_name/arg1/arg2//?kwarg1=a&kwarg2=b</pre>
- </div>
- <p><strong>NOTE</strong> Use with caution, preferably not make this publicly
- accessible without ensuring your code is safe!</p>
- </li>
- <li><p class="first">Refactored <tt class="docutils literal"><span class="pre">celery.task</span></tt>. It’s now split into three modules:</p>
- <ul>
- <li><p class="first">celery.task</p>
- <blockquote>
- <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
- shortcuts, plus imports objects from <tt class="docutils literal"><span class="pre">celery.task.base</span></tt> and
- <tt class="docutils literal"><span class="pre">celery.task.builtins</span></tt></p>
- </blockquote>
- </li>
- <li><p class="first">celery.task.base</p>
- <blockquote>
- <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>,
- <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>
- </blockquote>
- </li>
- <li><p class="first">celery.task.builtins</p>
- <blockquote>
- <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>
- </blockquote>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="section" id="id3">
- <h2>0.3.7 [2008-06-16 11:41 P.M CET]<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
- <ul>
- <li><p class="first"><strong>IMPORTANT</strong> Now uses AMQP’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>. This means we’re no longer polling the broker for
- new messages.</p>
- </li>
- <li><p class="first"><strong>IMPORTANT</strong> Default concurrency limit is now set to the number of CPUs
- available on the system.</p>
- </li>
- <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
- <tt class="docutils literal"><span class="pre">name</span></tt>, so</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </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">"mytask"</span><span class="p">)</span>
- </pre></div>
- </div>
- <p>has to be replaced with:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </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">"mytask"</span><span class="p">)</span>
- </pre></div>
- </div>
- </li>
- <li><p class="first">The daemon now correctly runs if the pidlock is stale.</p>
- </li>
- <li><p class="first">Now compatible with carrot 0.4.5</p>
- </li>
- <li><p class="first">Default AMQP connnection timeout is now 4 seconds.</p>
- </li>
- <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>
- </li>
- <li><p class="first">Only use README as long_description if the file exists so easy_install
- doesn’t break.</p>
- </li>
- <li><p class="first"><tt class="docutils literal"><span class="pre">celery.view</span></tt>: JSON responses now properly set its mime-type.</p>
- </li>
- <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
- can re-use the same AMQP connection if you want to execute
- more than one task.</p>
- </li>
- <li><p class="first">Handle failures in task_status view such that it won’t throw 500s.</p>
- </li>
- <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>
- </li>
- <li><p class="first">Worker exception e-mails sent to admins now works properly.</p>
- </li>
- <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’t affect
- the preferred Django version installed.</p>
- </li>
- <li><p class="first">Now works with PostgreSQL (psycopg2) again by registering the
- <tt class="docutils literal"><span class="pre">PickledObject</span></tt> field.</p>
- </li>
- <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
- it’s the term used in the documentation from now on.</p>
- </li>
- <li><p class="first">Make sure the pool and periodic task worker thread is terminated
- properly at exit. (So <tt class="docutils literal"><span class="pre">Ctrl-C</span></tt> works again).</p>
- </li>
- <li><p class="first">Now depends on <tt class="docutils literal"><span class="pre">python-daemon</span></tt>.</p>
- </li>
- <li><p class="first">Removed dependency to <tt class="docutils literal"><span class="pre">simplejson</span></tt></p>
- </li>
- <li><p class="first">Cache Backend: Re-establishes connection for every task process
- if the Django cache backend is memcached/libmemcached.</p>
- </li>
- <li><p class="first">Tyrant Backend: Now re-establishes the connection for every task
- executed.</p>
- </li>
- </ul>
- </div>
- <div class="section" id="id4">
- <h2>0.3.3 [2009-06-08 01:07 P.M CET]<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
- <ul>
- <li><dl class="first docutils">
- <dt>The <tt class="docutils literal"><span class="pre">PeriodicWorkController</span></tt> now sleeps for 1 second between checking</dt>
- <dd><p class="first last">for periodic tasks to execute.</p>
- </dd>
- </dl>
- </li>
- </ul>
- </div>
- <div class="section" id="id5">
- <h2>0.3.2 [2009-06-08 01:07 P.M CET]<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>celeryd: Added option <tt class="docutils literal"><span class="pre">--discard</span></tt>: Discard (delete!) all waiting
- messages in the queue.</li>
- <li>celeryd: The <tt class="docutils literal"><span class="pre">--wakeup-after</span></tt> option was not handled as a float.</li>
- </ul>
- </div>
- <div class="section" id="id6">
- <h2>0.3.1 [2009-06-08 01:07 P.M CET]<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>The <cite>PeriodicTask`</cite> worker is now running in its own thread instead
- of blocking the <tt class="docutils literal"><span class="pre">TaskController</span></tt> loop.</li>
- <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>
- </ul>
- </div>
- <div class="section" id="id7">
- <h2>0.3.0 [2009-06-08 12:41 P.M CET]<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
- <p><strong>NOTE</strong> This is a development version, for the stable release, please
- see versions 0.2.x.</p>
- <p><strong>VERY IMPORTANT:</strong> Pickle is now the encoder used for serializing task
- arguments, so be sure to flush your task queue before you upgrade.</p>
- <ul>
- <li><p class="first"><strong>IMPORTANT</strong> TaskSet.run() now returns a celery.result.TaskSetResult
- instance, which lets you inspect the status and return values of a
- taskset as it was a single entity.</p>
- </li>
- <li><p class="first"><strong>IMPORTANT</strong> Celery now depends on carrot >= 0.4.1.</p>
- </li>
- <li><p class="first">The celery daemon now sends task errors to the registered admin e-mails.
- To turn off this feature, set <tt class="docutils literal"><span class="pre">SEND_CELERY_TASK_ERROR_EMAILS</span></tt> to
- <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>
- </li>
- <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>
- <div class="highlight-python"><pre>$ python manage.py celeryd</pre>
- </div>
- <p>Thanks to Grégoire Cachet.</p>
- </li>
- <li><p class="first">Added support for message priorities, topic exchanges, custom routing
- keys for tasks. This means we have introduced
- <tt class="docutils literal"><span class="pre">celery.task.apply_async</span></tt>, a new way of executing tasks.</p>
- <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
- if you want greater control over the message sent, you want
- <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>
- <p>This also means the AMQP configuration has changed. Some settings has
- been renamed, while others are new:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_AMQP_EXCHANGE</span>
- <span class="n">CELERY_AMQP_PUBLISHER_ROUTING_KEY</span>
- <span class="n">CELERY_AMQP_CONSUMER_ROUTING_KEY</span>
- <span class="n">CELERY_AMQP_CONSUMER_QUEUE</span>
- <span class="n">CELERY_AMQP_EXCHANGE_TYPE</span>
- </pre></div>
- </div>
- <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
- <a class="reference external" href="http://ask.github.com/celery/faq.html">FAQ</a> for more information.</p>
- </li>
- </ul>
- <ul class="simple">
- <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>,
- and backtraces are dumped. Thanks to Grégoire Cachet.</li>
- <li>Make every new worker process re-establish it’s Django DB connection,
- this solving the “MySQL connection died?” exceptions.
- Thanks to Vitaly Babiy and Jirka Vejrazka.</li>
- <li><strong>IMOPORTANT</strong> Now using pickle to encode task arguments. This means you
- now can pass complex python objects to tasks as arguments.</li>
- <li>Removed dependency to <tt class="docutils literal"><span class="pre">yadayada</span></tt>.</li>
- <li>Added a FAQ, see <tt class="docutils literal"><span class="pre">docs/faq.rst</span></tt>.</li>
- <li>Now converts any unicode keys in task <tt class="docutils literal"><span class="pre">kwargs</span></tt> to regular strings.
- Thanks Vitaly Babiy.</li>
- <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>
- <li><tt class="docutils literal"><span class="pre">celery.datastructures.TaskProcessQueue</span></tt> is now renamed to
- <tt class="docutils literal"><span class="pre">celery.pool.TaskPool</span></tt>.</li>
- <li>The pool algorithm has been refactored for greater performance and
- stability.</li>
- </ul>
- </div>
- <div class="section" id="id8">
- <h2>0.2.0 [2009-05-20 05:14 P.M CET]<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Final release of 0.2.0</li>
- <li>Compatible with carrot version 0.4.0.</li>
- <li>Fixes some syntax errors related to fetching results
- from the database backend.</li>
- </ul>
- </div>
- <div class="section" id="pre3-2009-05-20-05-14-p-m-cet">
- <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>
- <ul class="simple">
- <li><em>Internal release</em>. Improved handling of unpickled exceptions,
- <tt class="docutils literal"><span class="pre">get_result</span></tt> now tries to recreate something looking like the
- original exception.</li>
- </ul>
- </div>
- <div class="section" id="pre2-2009-05-20-01-56-p-m-cet">
- <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>
- <ul class="simple">
- <li>Now handles unpickleable exceptions (like the dynimically generated
- subclasses of <tt class="docutils literal"><span class="pre">django.core.exception.MultipleObjectsReturned</span></tt>).</li>
- </ul>
- </div>
- <div class="section" id="pre1-2009-05-20-12-33-p-m-cet">
- <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>
- <ul class="simple">
- <li>It’s getting quite stable, with a lot of new features, so bump
- version to 0.2. This is a pre-release.</li>
- <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
- been removed. Use <tt class="docutils literal"><span class="pre">celery.backends.default_backend.mark_as_read()</span></tt>,
- and <tt class="docutils literal"><span class="pre">celery.backends.default_backend.mark_as_failure()</span></tt> instead.</li>
- </ul>
- </div>
- <div class="section" id="id9">
- <h2>0.1.15 [2009-05-19 04:13 P.M CET]<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>The celery daemon was leaking AMQP connections, this should be fixed,
- if you have any problems with too many files open (like <tt class="docutils literal"><span class="pre">emfile</span></tt>
- errors in <tt class="docutils literal"><span class="pre">rabbit.log</span></tt>, please contact us!</li>
- </ul>
- </div>
- <div class="section" id="id10">
- <h2>0.1.14 [2009-05-19 01:08 P.M CET]<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Fixed a syntax error in the <tt class="docutils literal"><span class="pre">TaskSet</span></tt> class. (No such variable
- <tt class="docutils literal"><span class="pre">TimeOutError</span></tt>).</li>
- </ul>
- </div>
- <div class="section" id="id11">
- <h2>0.1.13 [2009-05-19 12:36 P.M CET]<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h2>
- <ul>
- <li><p class="first">Forgot to add <tt class="docutils literal"><span class="pre">yadayada</span></tt> to install requirements.</p>
- </li>
- <li><p class="first">Now deletes all expired task results, not just those marked as done.</p>
- </li>
- <li><p class="first">Able to load the Tokyo Tyrant backend class without django
- configuration, can specify tyrant settings directly in the class
- constructor.</p>
- </li>
- <li><p class="first">Improved API documentation</p>
- </li>
- <li><p class="first">Now using the Sphinx documentation system, you can build
- the html documentation by doing</p>
- <div class="highlight-python"><pre>$ cd docs
- $ make html</pre>
- </div>
- <p>and the result will be in <tt class="docutils literal"><span class="pre">docs/.build/html</span></tt>.</p>
- </li>
- </ul>
- </div>
- <div class="section" id="id12">
- <h2>0.1.12 [2009-05-18 04:38 P.M CET]<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h2>
- <ul>
- <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,
- which lets you check the result and any failure that might have
- happened. It kind of works like the <tt class="docutils literal"><span class="pre">multiprocessing.AsyncResult</span></tt>
- class returned by <tt class="docutils literal"><span class="pre">multiprocessing.Pool.map_async</span></tt>.</p>
- </li>
- <li><p class="first">Added dmap() and dmap_async(). This works like the
- <tt class="docutils literal"><span class="pre">multiprocessing.Pool</span></tt> versions except they are tasks
- distributed to the celery server. Example:</p>
- <blockquote>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">dmap</span>
- <span class="gp">>>> </span><span class="kn">import</span> <span class="nn">operator</span>
- <span class="gp">>>> </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>
- <span class="gp">>>> </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>
- </pre></div>
- </div>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">celery.task</span> <span class="kn">import</span> <span class="n">dmap_async</span>
- <span class="gp">>>> </span><span class="kn">import</span> <span class="nn">operator</span>
- <span class="gp">>>> </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>
- <span class="gp">>>> </span><span class="n">result</span><span class="o">.</span><span class="n">ready</span><span class="p">()</span>
- <span class="go">False</span>
- <span class="gp">>>> </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>
- <span class="gp">>>> </span><span class="n">result</span><span class="o">.</span><span class="n">ready</span><span class="p">()</span>
- <span class="go">True</span>
- <span class="gp">>>> </span><span class="n">result</span><span class="o">.</span><span class="n">result</span>
- <span class="go">[4, 8, 16]</span>
- </pre></div>
- </div>
- </blockquote>
- </li>
- <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>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">CELERY_BACKEND</span> <span class="o">=</span> <span class="s">"database"</span><span class="p">;</span> <span class="c"># Uses the database</span>
- <span class="n">CELERY_BACKEND</span> <span class="o">=</span> <span class="s">"cache"</span><span class="p">;</span> <span class="c"># Uses the django cache framework</span>
- <span class="n">CELERY_BACKEND</span> <span class="o">=</span> <span class="s">"tyrant"</span><span class="p">;</span> <span class="c"># Uses Tokyo Tyrant</span>
- <span class="n">TT_HOST</span> <span class="o">=</span> <span class="s">"localhost"</span><span class="p">;</span> <span class="c"># Hostname for the Tokyo Tyrant server.</span>
- <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>
- </pre></div>
- </div>
- </li>
- </ul>
- </div>
- <div class="section" id="id13">
- <h2>0.1.11 [2009-05-12 02:08 P.M CET]<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>The logging system was leaking file descriptors, resulting in
- servers stopping with the EMFILES (too many open files) error. (fixed)</li>
- </ul>
- </div>
- <div class="section" id="id14">
- <h2>0.1.10 [2009-05-11 12:46 P.M CET]<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Tasks now supports both positional arguments and keyword arguments.</li>
- <li>Requires carrot 0.3.8.</li>
- <li>The daemon now tries to reconnect if the connection is lost.</li>
- </ul>
- </div>
- <div class="section" id="id15">
- <h2>0.1.8 [2009-05-07 12:27 P.M CET]<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Better test coverage</li>
- <li>More documentation</li>
- <li>celeryd doesn’t emit <tt class="docutils literal"><span class="pre">Queue</span> <span class="pre">is</span> <span class="pre">empty</span></tt> message if
- <tt class="docutils literal"><span class="pre">settings.CELERYD_EMPTY_MSG_EMIT_EVERY</span></tt> is 0.</li>
- </ul>
- </div>
- <div class="section" id="id16">
- <h2>0.1.7 [2009-04-30 1:50 P.M CET]<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Added some unittests</li>
- <li>Can now use the database for task metadata (like if the task has
- been executed or not). Set <tt class="docutils literal"><span class="pre">settings.CELERY_TASK_META</span></tt></li>
- <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
- within the <tt class="docutils literal"><span class="pre">testproj</span></tt> project.</li>
- <li>Can set the AMQP exchange/routing key/queue using
- <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>,
- and <tt class="docutils literal"><span class="pre">settings.CELERY_AMQP_CONSUMER_QUEUE</span></tt>.</li>
- </ul>
- </div>
- <div class="section" id="id17">
- <h2>0.1.6 [2009-04-28 2:13 P.M CET]<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h2>
- <ul>
- <li><p class="first">Introducing <tt class="docutils literal"><span class="pre">TaskSet</span></tt>. A set of subtasks is executed and you can
- find out how many, or if all them, are done (excellent for progress
- bars and such)</p>
- </li>
- <li><p class="first">Now catches all exceptions when running <tt class="docutils literal"><span class="pre">Task.__call__</span></tt>, so the
- daemon doesn’t die. This does’t happen for pure functions yet, only
- <tt class="docutils literal"><span class="pre">Task</span></tt> classes.</p>
- </li>
- <li><p class="first"><tt class="docutils literal"><span class="pre">autodiscover()</span></tt> now works with zipped eggs.</p>
- </li>
- <li><p class="first">celeryd: Now adds curernt working directory to <tt class="docutils literal"><span class="pre">sys.path</span></tt> for
- convenience.</p>
- </li>
- <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
- <tt class="docutils literal"><span class="pre">datetime.timedelta()</span></tt> object.</p>
- </li>
- <li><p class="first">celeryd: You can now set the <tt class="docutils literal"><span class="pre">DJANGO_PROJECT_DIR</span></tt> variable
- 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>
- </li>
- <li><p class="first">Can now check if a task has been executed or not via HTTP.</p>
- </li>
- <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>
- <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">url</span><span class="p">(</span><span class="s">r'^celery/$'</span><span class="p">,</span> <span class="n">include</span><span class="p">(</span><span class="s">"celery.urls"</span><span class="p">))</span>
- </pre></div>
- </div>
- <p>then visiting the following url,:</p>
- <div class="highlight-python"><pre>http://mysite/celery/$task_id/done/</pre>
- </div>
- <p>this will return a JSON dictionary like e.g:</p>
- <div class="highlight-python"><pre>>>> {"task": {"id": $task_id, "executed": true}}</pre>
- </div>
- </li>
- <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>
- </li>
- <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>
- </li>
- <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
- the name change request is in <tt class="docutils literal"><span class="pre">docs/name_change_request.txt</span></tt>.</p>
- </li>
- </ul>
- </div>
- <div class="section" id="id18">
- <h2>0.1.0 [2009-04-24 11:28 A.M CET]<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h2>
- <ul class="simple">
- <li>Initial release</li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar">
- <div class="sphinxsidebarwrapper">
- <h3><a href="index.html">Table Of Contents</a></h3>
- <ul>
- <li><a class="reference external" href="">Change history</a><ul>
- <li><a class="reference external" href="#a-m-cet">0.6.0 [2009-08-07 06:54 A.M CET]</a></li>
- <li><a class="reference external" href="#p-m-cet">0.4.1 [2009-07-02 01:42 P.M CET]</a></li>
- <li><a class="reference external" href="#id1">0.4.0 [2009-07-01 07:29 P.M CET]</a></li>
- <li><a class="reference external" href="#id2">0.3.20 [2009-06-25 08:42 P.M CET]</a></li>
- <li><a class="reference external" href="#id3">0.3.7 [2008-06-16 11:41 P.M CET]</a></li>
- <li><a class="reference external" href="#id4">0.3.3 [2009-06-08 01:07 P.M CET]</a></li>
- <li><a class="reference external" href="#id5">0.3.2 [2009-06-08 01:07 P.M CET]</a></li>
- <li><a class="reference external" href="#id6">0.3.1 [2009-06-08 01:07 P.M CET]</a></li>
- <li><a class="reference external" href="#id7">0.3.0 [2009-06-08 12:41 P.M CET]</a></li>
- <li><a class="reference external" href="#id8">0.2.0 [2009-05-20 05:14 P.M CET]</a></li>
- <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>
- <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>
- <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>
- <li><a class="reference external" href="#id9">0.1.15 [2009-05-19 04:13 P.M CET]</a></li>
- <li><a class="reference external" href="#id10">0.1.14 [2009-05-19 01:08 P.M CET]</a></li>
- <li><a class="reference external" href="#id11">0.1.13 [2009-05-19 12:36 P.M CET]</a></li>
- <li><a class="reference external" href="#id12">0.1.12 [2009-05-18 04:38 P.M CET]</a></li>
- <li><a class="reference external" href="#id13">0.1.11 [2009-05-12 02:08 P.M CET]</a></li>
- <li><a class="reference external" href="#id14">0.1.10 [2009-05-11 12:46 P.M CET]</a></li>
- <li><a class="reference external" href="#id15">0.1.8 [2009-05-07 12:27 P.M CET]</a></li>
- <li><a class="reference external" href="#id16">0.1.7 [2009-04-30 1:50 P.M CET]</a></li>
- <li><a class="reference external" href="#id17">0.1.6 [2009-04-28 2:13 P.M CET]</a></li>
- <li><a class="reference external" href="#id18">0.1.0 [2009-04-24 11:28 A.M CET]</a></li>
- </ul>
- </li>
- </ul>
- <h4>Previous topic</h4>
- <p class="topless"><a href="reference/celery.bin.celeryinit.html"
- title="previous chapter">Celery Initialize - celery.bin.celeryinit</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="links.html"
- title="next chapter">Interesting Links</a></p>
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="sources/changelog.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- <div id="searchbox" style="display: none">
- <h3>Quick search</h3>
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" size="18" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- <p class="searchtip" style="font-size: 90%">
- Enter search terms or a module, class or function name.
- </p>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="modindex.html" title="Global Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="links.html" title="Interesting Links"
- >next</a> |</li>
- <li class="right" >
- <a href="reference/celery.bin.celeryinit.html" title="Celery Initialize - celery.bin.celeryinit"
- >previous</a> |</li>
- <li><a href="index.html">Celery v0.7.0 (unstable) documentation</a> »</li>
- </ul>
- </div>
- <div class="footer">
- © Copyright 2009, Ask Solem.
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
- </div>
- </body>
- </html>
|