Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ask committed Sep 18, 2013
2 parents ab83c9e + b1d80b2 commit 9103391
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ new in Celery 3.1.
.. _version-3.1.0:

3.1.0
=====
=======
:release-date: TBA
:state: FROZEN
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion celery/app/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _create_task_cls(fun):
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:
Expand Down
26 changes: 15 additions & 11 deletions celery/backends/amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -108,16 +112,16 @@ def _routing_key(self, task_id):

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):
Expand Down
17 changes: 17 additions & 0 deletions celery/tests/tasks/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,28 @@
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
Expand Down
29 changes: 29 additions & 0 deletions docs/history/changelog-3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/includes/introduction.txt
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
8 changes: 8 additions & 0 deletions docs/userguide/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion requirements/default.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytz>dev
billiard>=2.7.3.32
kombu>=2.5.13
kombu>=2.5.14
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9103391

Please sign in to comment.