Преглед на файлове

Merge branch '3.0'

Conflicts:
	CONTRIBUTORS.txt
	Changelog
	README.rst
	celery/__init__.py
	celery/app/base.py
	celery/apps/worker.py
	celery/backends/amqp.py
	celery/platforms.py
	celery/tests/tasks/test_tasks.py
	celery/tests/utils/test_term.py
	docs/includes/introduction.txt
	requirements/default.txt
	setup.cfg
Ask Solem преди 11 години
родител
ревизия
910339116f
променени са 10 файла, в които са добавени 78 реда и са изтрити 16 реда
  1. 1 1
      Changelog
  2. 4 0
      README.rst
  3. 1 1
      celery/app/base.py
  4. 15 11
      celery/backends/amqp.py
  5. 17 0
      celery/tests/tasks/test_tasks.py
  6. 29 0
      docs/history/changelog-3.0.rst
  7. 1 1
      docs/includes/introduction.txt
  8. 8 0
      docs/userguide/security.rst
  9. 1 1
      requirements/default.txt
  10. 1 1
      setup.cfg

+ 1 - 1
Changelog

@@ -11,6 +11,6 @@ new in Celery 3.1.
 .. _version-3.1.0:
 
 3.1.0
-=====
+=======
 :release-date: TBA
 :state: FROZEN

+ 4 - 0
README.rst

@@ -4,7 +4,11 @@
 
 .. image:: http://cloud.github.com/downloads/celery/celery/celery_128.png
 
+<<<<<<< HEAD
 :Version: 3.1.0rc4 (Cipater)
+=======
+:Version: 3.0.23 (Chiastic Slide)
+>>>>>>> 3.0
 :Web: http://celeryproject.org/
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/celery/celery/

+ 1 - 1
celery/app/base.py

@@ -201,7 +201,7 @@ class Celery(object):
                 if opts.get('_force_evaluate'):
                     ret = self._task_from_fun(fun, **opts)
                 else:
-                    # return a proxy object that only evaluates on first use
+                    # return a proxy object that evaluates on first use
                     ret = PromiseProxy(self._task_from_fun, (fun, ), opts)
                     self._pending.append(ret)
                 if _filt:

+ 15 - 11
celery/backends/amqp.py

@@ -43,10 +43,14 @@ def repair_uuid(s):
     return '%s-%s-%s-%s-%s' % (s[:8], s[8:12], s[12:16], s[16:20], s[20:])
 
 
+class NoCacheQueue(Queue):
+    can_cache_declaration = False
+
+
 class AMQPBackend(BaseBackend):
     """Publishes results by sending messages."""
     Exchange = Exchange
-    Queue = Queue
+    Queue = NoCacheQueue
     Consumer = Consumer
     Producer = Producer
 
@@ -108,16 +112,16 @@ class AMQPBackend(BaseBackend):
 
     def _store_result(self, task_id, result, status, traceback=None):
         """Send task return value and status."""
-        with self.app.amqp.producer_pool.acquire(block=True) as pub:
-            pub.publish({'task_id': task_id, 'status': status,
-                         'result': self.encode_result(result, status),
-                         'traceback': traceback,
-                         'children': self.current_task_children()},
-                        exchange=self.exchange,
-                        routing_key=self._routing_key(task_id),
-                        serializer=self.serializer,
-                        retry=True, retry_policy=self.retry_policy,
-                        declare=self.on_reply_declare(task_id))
+        with self.app.amqp.producer_pool.acquire(block=True) as producer:
+            producer.publish({'task_id': task_id, 'status': status,
+                              'result': self.encode_result(result, status),
+                              'traceback': traceback,
+                              'children': self.current_task_children()},
+                             exchange=self.exchange,
+                             routing_key=self._routing_key(task_id),
+                             serializer=self.serializer,
+                             retry=True, retry_policy=self.retry_policy,
+                             declare=self.on_reply_declare(task_id))
         return result
 
     def on_reply_declare(self, task_id):

+ 17 - 0
celery/tests/tasks/test_tasks.py

@@ -3,11 +3,28 @@ from __future__ import absolute_import
 from collections import Callable
 from datetime import datetime, timedelta
 from mock import patch
+<<<<<<< HEAD
 
 from kombu import Queue
 
 from celery import Task
 
+=======
+from nose import SkipTest
+from pickle import loads, dumps
+
+from celery.task import (
+    current,
+    task,
+    Task,
+    BaseTask,
+    TaskSet,
+    periodic_task,
+    PeriodicTask
+)
+from celery import current_app
+from celery.app import app_or_default
+>>>>>>> 3.0
 from celery.exceptions import RetryTaskError
 from celery.five import items, range, string_t
 from celery.result import EagerResult

+ 29 - 0
docs/history/changelog-3.0.rst

@@ -9,6 +9,35 @@
 
 If you're looking for versions prior to 3.0.x you should go to :ref:`history`.
 
+.. _version-3.0.23:
+
+3.0.23
+======
+:release-date: 2013-09-02 01:00 P.M BST
+
+- Now depends on :ref:`Kombu 2.5.14 <kombu:version-2.5.14>`.
+
+- ``send_task`` did not honor ``link`` and ``link_error`` arguments.
+
+    This had the side effect of chains not calling unregistered tasks,
+    silently discarding them.
+
+    Fix contributed by Taylor Nelson.
+
+- :mod:`celery.state`: Optimized precedence lookup.
+
+    Contributed by Matt Robenolt.
+
+- Posix: Daemonization did not redirect ``sys.stdin`` to ``/dev/null``.
+
+    Fix contributed by Alexander Smirnov.
+
+- Canvas: group bug caused fallback to default app when ``.apply_async`` used
+  (Issue #1516)
+
+- Canvas: generator arguments was not always pickleable.
+
+
 .. _version-3.0.22:
 
 3.0.22

+ 1 - 1
docs/includes/introduction.txt

@@ -1,4 +1,4 @@
-:Version: 3.1.0rc4 (Cipater)
+:Version: 3.0.23 (Chiastic Slide)
 :Web: http://celeryproject.org/
 :Download: http://pypi.python.org/pypi/celery/
 :Source: http://github.com/celery/celery/

+ 8 - 0
docs/userguide/security.rst

@@ -104,6 +104,14 @@ You can disable untrusted content by specifying
 a white-list of accepted content-types in the :setting:`CELERY_ACCEPT_CONTENT`
 setting:
 
+.. versionadded:: 3.0.18
+
+.. note::
+
+    This setting was first supported in version 3.0.18. If you're
+    running an earlier version it will simply be ignored, so make
+    sure you're running a version that supports it.
+
 .. code-block:: python
 
     CELERY_ACCEPT_CONTENT = ['json']

+ 1 - 1
requirements/default.txt

@@ -1,3 +1,3 @@
 pytz>dev
 billiard>=2.7.3.32
-kombu>=2.5.13
+kombu>=2.5.14

+ 1 - 1
setup.cfg

@@ -16,4 +16,4 @@ upload-dir = docs/.build/html
 [bdist_rpm]
 requires = pytz >= 2011b
            billiard >= 2.7.3.32
-           kombu >= 2.5.13
+           kombu >= 2.5.14