Permalink
Comparing changes
Open a pull request
- 11 commits
- 264 files changed
- 0 commit comments
- 4 contributors
Unified
Split
Showing
with
1,032 additions
and 879 deletions.
- +1 −1 .bumpversion.cfg
- +1 −1 README.rst
- +2 −1 celery/__init__.py
- +2 −0 celery/__main__.py
- +2 −0 celery/_state.py
- +2 −4 celery/app/amqp.py
- +1 −0 celery/app/annotations.py
- +3 −1 celery/app/backends.py
- +17 −24 celery/app/base.py
- +1 −0 celery/app/builtins.py
- +3 −0 celery/app/control.py
- +2 −0 celery/app/defaults.py
- +2 −0 celery/app/events.py
- +3 −6 celery/app/log.py
- +3 −1 celery/app/registry.py
- +3 −0 celery/app/routes.py
- +3 −2 celery/app/task.py
- +23 −20 celery/app/trace.py
- +3 −6 celery/app/utils.py
- +6 −4 celery/apps/beat.py
- +2 −4 celery/apps/multi.py
- +2 −6 celery/apps/worker.py
- +2 −3 celery/backends/amqp.py
- +0 −1 celery/backends/async.py
- +12 −18 celery/backends/base.py
- +4 −0 celery/backends/cache.py
- +4 −0 celery/backends/cassandra.py
- +4 −1 celery/backends/consul.py
- +5 −0 celery/backends/couchbase.py
- +4 −0 celery/backends/couchdb.py
- +5 −1 celery/backends/database/models.py
- +2 −1 celery/backends/database/session.py
- +6 −2 celery/backends/dynamodb.py
- +6 −1 celery/backends/elasticsearch.py
- +5 −2 celery/backends/filesystem.py
- +11 −7 celery/backends/mongodb.py
- +8 −2 celery/backends/redis.py
- +5 −0 celery/backends/riak.py
- +1 −1 celery/backends/rpc.py
- +7 −11 celery/beat.py
- +3 −5 celery/bin/amqp.py
- +8 −14 celery/bin/base.py
- +3 −1 celery/bin/beat.py
- +2 −0 celery/bin/call.py
- +6 −10 celery/bin/celery.py
- +4 −2 celery/bin/celeryd_detach.py
- +3 −1 celery/bin/control.py
- +3 −1 celery/bin/events.py
- +3 −0 celery/bin/graph.py
- +1 −0 celery/bin/list.py
- +2 −0 celery/bin/logtool.py
- +1 −0 celery/bin/migrate.py
- +3 −0 celery/bin/multi.py
- +2 −1 celery/bin/purge.py
- +1 −0 celery/bin/result.py
- +3 −1 celery/bin/shell.py
- +2 −0 celery/bin/upgrade.py
- +2 −0 celery/bin/worker.py
- +11 −7 celery/canvas.py
- +3 −4 celery/concurrency/asynpool.py
- +1 −1 celery/concurrency/base.py
- +7 −8 celery/concurrency/eventlet.py
- +4 −1 celery/concurrency/gevent.py
- +5 −5 celery/concurrency/prefork.py
- +2 −0 celery/concurrency/solo.py
- +1 −0 celery/contrib/abortable.py
- +1 −2 celery/contrib/migrate.py
- +4 −1 celery/contrib/pytest.py
- +3 −0 celery/contrib/rdb.py
- +3 −0 celery/contrib/sphinx.py
- +4 −2 celery/contrib/testing/app.py
- +0 −1 celery/contrib/testing/manager.py
- +2 −0 celery/contrib/testing/mocks.py
- +1 −0 celery/contrib/testing/tasks.py
- +3 −1 celery/contrib/testing/worker.py
- +2 −4 celery/events/cursesmon.py
- +0 −1 celery/events/dispatcher.py
- +2 −0 celery/events/dumper.py
- +2 −0 celery/events/event.py
- +0 −1 celery/events/receiver.py
- +3 −1 celery/events/snapshot.py
- +2 −1 celery/events/state.py
- +10 −4 celery/exceptions.py
- +3 −0 celery/five.py
- +3 −5 celery/fixups/django.py
- +1 −0 celery/loaders/app.py
- +2 −4 celery/loaders/base.py
- +3 −0 celery/loaders/default.py
- +2 −0 celery/local.py
- +5 −4 celery/platforms.py
- +3 −6 celery/result.py
- +10 −8 celery/schedules.py
- +4 −0 celery/security/certificate.py
- +2 −0 celery/security/key.py
- +3 −3 celery/security/serialization.py
- +3 −0 celery/security/utils.py
- +1 −0 celery/signals.py
- +5 −1 celery/task/base.py
- +2 −0 celery/utils/abstract.py
- +12 −7 celery/utils/collections.py
- +0 −1 celery/utils/debug.py
- +4 −1 celery/utils/deprecated.py
- +4 −1 celery/utils/dispatch/signal.py
- +1 −0 celery/utils/dispatch/weakref_backports.py
- +5 −4 celery/utils/encoding.py
- +2 −5 celery/utils/functional.py
- +4 −1 celery/utils/graph.py
- +3 −0 celery/utils/imports.py
- +2 −0 celery/utils/iso8601.py
- +3 −2 celery/utils/log.py
- +3 −0 celery/utils/nodenames.py
- +1 −0 celery/utils/objects.py
- +0 −2 celery/utils/saferepr.py
- +4 −5 celery/utils/serialization.py
- +2 −0 celery/utils/sysinfo.py
- +3 −1 celery/utils/term.py
- +3 −1 celery/utils/text.py
- +1 −2 celery/utils/threads.py
- +3 −4 celery/utils/time.py
- +5 −4 celery/utils/timer2.py
- +1 −2 celery/worker/autoscale.py
- +4 −3 celery/worker/components.py
- +2 −0 celery/worker/consumer/agent.py
- +2 −0 celery/worker/consumer/connection.py
- +5 −9 celery/worker/consumer/consumer.py
- +2 −0 celery/worker/consumer/control.py
- +3 −0 celery/worker/consumer/events.py
- +1 −1 celery/worker/consumer/gossip.py
- +2 −0 celery/worker/consumer/heart.py
- +2 −0 celery/worker/consumer/mingle.py
- +3 −0 celery/worker/consumer/tasks.py
- +0 −1 celery/worker/control.py
- +3 −1 celery/worker/heartbeat.py
- +4 −1 celery/worker/loops.py
- +4 −0 celery/worker/pidbox.py
- +6 −7 celery/worker/request.py
- +1 −1 celery/worker/state.py
- +1 −1 celery/worker/strategy.py
- +12 −10 celery/worker/worker.py
- +1 −1 docs/includes/introduction.txt
- +1 −1 docs/userguide/configuration.rst
- +4 −4 docs/userguide/extending.rst
- +1 −1 requirements/default.txt
- +1 −1 requirements/test.txt
- +1 −1 setup.cfg
- +5 −3 t/benchmarks/bench_worker.py
- +2 −0 t/distro/test_CI_reqs.py
- +4 −1 t/integration/conftest.py
- +3 −1 t/integration/tasks.py
- +3 −0 t/integration/test_canvas.py
- +2 −0 t/integration/test_tasks.py
- +4 −1 t/unit/app/test_amqp.py
- +1 −0 t/unit/app/test_annotations.py
- +7 −9 t/unit/app/test_app.py
- +2 −0 t/unit/app/test_backends.py
- +7 −5 t/unit/app/test_beat.py
- +3 −1 t/unit/app/test_builtins.py
- +3 −1 t/unit/app/test_celery.py
- +2 −0 t/unit/app/test_control.py
- +6 −4 t/unit/app/test_defaults.py
- +2 −0 t/unit/app/test_exceptions.py
- +2 −3 t/unit/app/test_loaders.py
- +6 −14 t/unit/app/test_log.py
- +2 −0 t/unit/app/test_registry.py
- +0 −1 t/unit/app/test_routes.py
- +3 −5 t/unit/app/test_schedules.py
- +4 −1 t/unit/app/test_utils.py
- +7 −5 t/unit/apps/test_multi.py
- +3 −5 t/unit/backends/test_amqp.py
- +7 −13 t/unit/backends/test_base.py
- +7 −5 t/unit/backends/test_cache.py
- +5 −2 t/unit/backends/test_cassandra.py
- +2 −0 t/unit/backends/test_consul.py
- +3 −1 t/unit/backends/test_couchbase.py
- +7 −4 t/unit/backends/test_couchdb.py
- +3 −5 t/unit/backends/test_database.py
- +26 −25 t/unit/backends/test_dynamodb.py
- +2 −0 t/unit/backends/test_elasticsearch.py
- +2 −3 t/unit/backends/test_filesystem.py
- +3 −6 t/unit/backends/test_mongodb.py
- +24 −10 t/unit/backends/test_redis.py
- +2 −0 t/unit/backends/test_riak.py
- +3 −1 t/unit/backends/test_rpc.py
- +1 −0 t/unit/bin/celery.py
- +3 −7 t/unit/bin/test_amqp.py
- +4 −5 t/unit/bin/test_base.py
- +6 −4 t/unit/bin/test_beat.py
- +5 −2 t/unit/bin/test_call.py
- +11 −13 t/unit/bin/test_celery.py
- +3 −6 t/unit/bin/test_celeryd_detach.py
- +4 −5 t/unit/bin/test_celeryevdump.py
- +4 −2 t/unit/bin/test_control.py
- +5 −0 t/unit/bin/test_events.py
- +2 −0 t/unit/bin/test_list.py
- +3 −1 t/unit/bin/test_migrate.py
- +7 −2 t/unit/bin/test_multi.py
- +3 −1 t/unit/bin/test_purge.py
- +3 −1 t/unit/bin/test_result.py
- +7 −8 t/unit/bin/test_worker.py
- +5 −5 t/unit/compat_modules/test_compat.py
- +3 −1 t/unit/compat_modules/test_compat_utils.py
- +4 −1 t/unit/compat_modules/test_decorators.py
- +2 −0 t/unit/compat_modules/test_messaging.py
- +5 −2 t/unit/concurrency/test_concurrency.py
- +5 −6 t/unit/concurrency/test_eventlet.py
- +3 −5 t/unit/concurrency/test_gevent.py
- +4 −2 t/unit/concurrency/test_pool.py
- +1 −2 t/unit/concurrency/test_prefork.py
- +2 −0 t/unit/concurrency/test_solo.py
- +6 −9 t/unit/conftest.py
- +2 −1 t/unit/contrib/test_abortable.py
- +8 −22 t/unit/contrib/test_migrate.py
- +4 −5 t/unit/contrib/test_rdb.py
- +1 −0 t/unit/events/test_cursesmon.py
- +4 −1 t/unit/events/test_events.py
- +2 −0 t/unit/events/test_snapshot.py
- +5 −13 t/unit/events/test_state.py
- +22 −24 t/unit/fixups/test_django.py
- +1 −0 t/unit/security/case.py
- +3 −0 t/unit/security/test_certificate.py
- +3 −0 t/unit/security/test_key.py
- +1 −3 t/unit/security/test_security.py
- +2 −2 t/unit/security/test_serialization.py
- +7 −15 t/unit/tasks/test_canvas.py
- +6 −5 t/unit/tasks/test_chord.py
- +1 −0 t/unit/tasks/test_context.py
- +15 −24 t/unit/tasks/test_result.py
- +2 −0 t/unit/tasks/test_states.py
- +1 −2 t/unit/tasks/test_tasks.py
- +11 −19 t/unit/tasks/test_trace.py
- +5 −11 t/unit/utils/test_collections.py
- +2 −0 t/unit/utils/test_debug.py
- +2 −0 t/unit/utils/test_deprecated.py
- +2 −1 t/unit/utils/test_dispatcher.py
- +1 −0 t/unit/utils/test_encoding.py
- +9 −16 t/unit/utils/test_functional.py
- +2 −0 t/unit/utils/test_graph.py
- +4 −8 t/unit/utils/test_imports.py
- +6 −8 t/unit/utils/test_local.py
- +2 −0 t/unit/utils/test_nodenames.py
- +1 −0 t/unit/utils/test_objects.py
- +1 −0 t/unit/utils/test_pickle.py
- +11 −28 t/unit/utils/test_platforms.py
- +7 −5 t/unit/utils/test_saferepr.py
- +7 −7 t/unit/utils/test_serialization.py
- +3 −1 t/unit/utils/test_sysinfo.py
- +3 −1 t/unit/utils/test_term.py
- +4 −8 t/unit/utils/test_text.py
- +4 −7 t/unit/utils/test_threads.py
- +10 −17 t/unit/utils/test_time.py
- +4 −1 t/unit/utils/test_timer2.py
- +5 −3 t/unit/utils/test_utils.py
- +4 −2 t/unit/worker/test_autoscale.py
- +2 −0 t/unit/worker/test_bootsteps.py
- +2 −0 t/unit/worker/test_components.py
- +5 −6 t/unit/worker/test_consumer.py
- +5 −7 t/unit/worker/test_control.py
- +2 −0 t/unit/worker/test_heartbeat.py
- +4 −5 t/unit/worker/test_loops.py
- +11 −25 t/unit/worker/test_request.py
- +1 −0 t/unit/worker/test_revoke.py
- +5 −2 t/unit/worker/test_state.py
- +2 −3 t/unit/worker/test_strategy.py
- +13 −15 t/unit/worker/test_worker.py
| @@ -1,5 +1,5 @@ | ||
| [bumpversion] | ||
| current_version = 4.1.0 | ||
| current_version = 4.1.1 | ||
| commit = True | ||
| tag = True | ||
| parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<releaselevel>[a-z]+)? | ||
| @@ -2,7 +2,7 @@ | ||
| |build-status| |license| |wheel| |pyversion| |pyimp| | ||
| :Version: 4.1.0 (latentcall) | ||
| :Version: 4.1.1 (latentcall) | ||
| :Web: http://celeryproject.org/ | ||
| :Download: https://pypi.python.org/pypi/celery/ | ||
| :Source: https://github.com/celery/celery/ | ||
| @@ -14,7 +14,7 @@ | ||
| SERIES = 'latentcall' | ||
| __version__ = '4.1.0' | ||
| __version__ = '4.1.1' | ||
| __author__ = 'Ask Solem' | ||
| __contact__ = 'ask@celeryproject.org' | ||
| __homepage__ = 'http://celeryproject.org' | ||
| @@ -145,6 +145,7 @@ def maybe_patch_concurrency(argv=sys.argv, | ||
| from celery import concurrency | ||
| concurrency.get_implementation(pool) | ||
| # Lazy loading | ||
| from . import local # noqa | ||
| @@ -1,6 +1,8 @@ | ||
| """Entry-point for the :program:`celery` umbrella command.""" | ||
| from __future__ import absolute_import, print_function, unicode_literals | ||
| import sys | ||
| from . import maybe_patch_concurrency | ||
| __all__ = ['main'] | ||
| @@ -7,10 +7,12 @@ | ||
| This module shouldn't be used directly. | ||
| """ | ||
| from __future__ import absolute_import, print_function, unicode_literals | ||
| import os | ||
| import sys | ||
| import threading | ||
| import weakref | ||
| from celery.local import Proxy | ||
| from celery.utils.threads import LocalStack | ||
| @@ -4,13 +4,11 @@ | ||
| import numbers | ||
| import sys | ||
| from collections import Mapping, namedtuple | ||
| from datetime import timedelta | ||
| from weakref import WeakValueDictionary | ||
| from kombu import pools | ||
| from kombu import Connection, Consumer, Exchange, Producer, Queue | ||
| from kombu import Connection, Consumer, Exchange, Producer, Queue, pools | ||
| from kombu.common import Broadcast | ||
| from kombu.utils.functional import maybe_list | ||
| from kombu.utils.objects import cached_property | ||
| @@ -522,7 +520,7 @@ def send_task_message(producer, name, message, | ||
| # convert to anon-exchange, when exchange not set and direct ex. | ||
| if (not exchange or not routing_key) and exchange_type == 'direct': | ||
| exchange, routing_key = '', qname | ||
| exchange, routing_key = '', qname | ||
| elif exchange is None: | ||
| # not topic exchange, and exchange not undefined | ||
| exchange = queue.exchange.name or default_exchange | ||
| @@ -8,6 +8,7 @@ | ||
| :setting:`task_annotations` setting. | ||
| """ | ||
| from __future__ import absolute_import, unicode_literals | ||
| from celery.five import string_t | ||
| from celery.utils.functional import firstmethod, mlazy | ||
| from celery.utils.imports import instantiate | ||
| @@ -1,10 +1,12 @@ | ||
| # -*- coding: utf-8 -*- | ||
| """Backend selection.""" | ||
| from __future__ import absolute_import, unicode_literals | ||
| import sys | ||
| import types | ||
| from celery.exceptions import ImproperlyConfigured | ||
| from celery._state import current_app | ||
| from celery.exceptions import ImproperlyConfigured | ||
| from celery.five import reraise | ||
| from celery.utils.imports import load_extension_class_names, symbol_by_name | ||
| @@ -5,7 +5,6 @@ | ||
| import os | ||
| import threading | ||
| import warnings | ||
| from collections import defaultdict, deque | ||
| from operator import attrgetter | ||
| @@ -18,42 +17,34 @@ | ||
| from vine import starpromise | ||
| from vine.utils import wraps | ||
| from celery import platforms | ||
| from celery import signals | ||
| from celery._state import ( | ||
| _task_stack, get_current_app, _set_current_app, set_default_app, | ||
| _register_app, _deregister_app, | ||
| get_current_worker_task, connect_on_app_finalize, | ||
| _announce_app_finalized, | ||
| ) | ||
| from celery import platforms, signals | ||
| from celery._state import (_announce_app_finalized, _deregister_app, | ||
| _register_app, _set_current_app, _task_stack, | ||
| connect_on_app_finalize, get_current_app, | ||
| get_current_worker_task, set_default_app) | ||
| from celery.exceptions import AlwaysEagerIgnored, ImproperlyConfigured | ||
| from celery.five import ( | ||
| UserDict, bytes_if_py2, python_2_unicode_compatible, values, | ||
| ) | ||
| from celery.five import (UserDict, bytes_if_py2, python_2_unicode_compatible, | ||
| values) | ||
| from celery.loaders import get_loader_cls | ||
| from celery.local import PromiseProxy, maybe_evaluate | ||
| from celery.utils import abstract | ||
| from celery.utils.collections import AttributeDictMixin | ||
| from celery.utils.dispatch import Signal | ||
| from celery.utils.functional import first, maybe_list, head_from_fun | ||
| from celery.utils.time import timezone | ||
| from celery.utils.functional import first, head_from_fun, maybe_list | ||
| from celery.utils.imports import gen_task_name, instantiate, symbol_by_name | ||
| from celery.utils.log import get_logger | ||
| from celery.utils.objects import FallbackContext, mro_lookup | ||
| from celery.utils.time import timezone | ||
| from .annotations import prepare as prepare_annotations | ||
| # Load all builtin tasks | ||
| from . import builtins # noqa | ||
| from . import backends | ||
| from .annotations import prepare as prepare_annotations | ||
| from .defaults import find_deprecated_settings | ||
| from .registry import TaskRegistry | ||
| from .utils import ( | ||
| AppPickler, Settings, | ||
| bugreport, _unpickle_app, _unpickle_app_v2, | ||
| _old_key_to_new, _new_key_to_old, | ||
| appstr, detect_settings, | ||
| ) | ||
| # Load all builtin tasks | ||
| from . import builtins # noqa | ||
| from .utils import (AppPickler, Settings, _new_key_to_old, _old_key_to_new, | ||
| _unpickle_app, _unpickle_app_v2, appstr, bugreport, | ||
| detect_settings) | ||
| __all__ = ['Celery'] | ||
| @@ -1252,4 +1243,6 @@ def timezone(self): | ||
| if not conf.timezone: | ||
| return timezone.local | ||
| return timezone.get_timezone(tz) | ||
| App = Celery # noqa: E305 XXX compat | ||
| @@ -4,6 +4,7 @@ | ||
| The built-in tasks are always available in all app instances. | ||
| """ | ||
| from __future__ import absolute_import, unicode_literals | ||
| from celery._state import connect_on_app_finalize | ||
| from celery.utils.log import get_logger | ||
| @@ -5,11 +5,14 @@ | ||
| Server implementation is in :mod:`celery.worker.control`. | ||
| """ | ||
| from __future__ import absolute_import, unicode_literals | ||
| import warnings | ||
| from billiard.common import TERM_SIGNAME | ||
| from kombu.pidbox import Mailbox | ||
| from kombu.utils.functional import lazy | ||
| from kombu.utils.objects import cached_property | ||
| from celery.exceptions import DuplicateNodenameWarning | ||
| from celery.utils.text import pluralize | ||
| @@ -1,9 +1,11 @@ | ||
| # -*- coding: utf-8 -*- | ||
| """Configuration introspection and defaults.""" | ||
| from __future__ import absolute_import, unicode_literals | ||
| import sys | ||
| from collections import deque, namedtuple | ||
| from datetime import timedelta | ||
| from celery.five import items, keys, python_2_unicode_compatible | ||
| from celery.utils.functional import memoize | ||
| from celery.utils.serialization import strtobool | ||
| @@ -1,6 +1,8 @@ | ||
| """Implementation for the app.events shortcuts.""" | ||
| from __future__ import absolute_import, unicode_literals | ||
| from contextlib import contextmanager | ||
| from kombu.utils.objects import cached_property | ||
| @@ -12,7 +12,6 @@ | ||
| import logging | ||
| import os | ||
| import sys | ||
| from logging.handlers import WatchedFileHandler | ||
| from kombu.utils.encoding import set_default_encoding_file | ||
| @@ -22,11 +21,9 @@ | ||
| from celery.five import string_t | ||
| from celery.local import class_property | ||
| from celery.platforms import isatty | ||
| from celery.utils.log import ( | ||
| get_logger, mlevel, | ||
| ColorFormatter, LoggingProxy, get_multiprocessing_logger, | ||
| reset_multiprocessing_logger, | ||
| ) | ||
| from celery.utils.log import (ColorFormatter, LoggingProxy, get_logger, | ||
| get_multiprocessing_logger, mlevel, | ||
| reset_multiprocessing_logger) | ||
| from celery.utils.nodenames import node_format | ||
| from celery.utils.term import colored | ||
| @@ -1,10 +1,12 @@ | ||
| # -*- coding: utf-8 -*- | ||
| """Registry of available tasks.""" | ||
| from __future__ import absolute_import, unicode_literals | ||
| import inspect | ||
| from importlib import import_module | ||
| from celery._state import get_current_app | ||
| from celery.exceptions import NotRegistered, InvalidTaskError | ||
| from celery.exceptions import InvalidTaskError, NotRegistered | ||
| from celery.five import items | ||
| __all__ = ['TaskRegistry'] | ||
| @@ -4,10 +4,13 @@ | ||
| Contains utilities for working with task routers, (:setting:`task_routes`). | ||
| """ | ||
| from __future__ import absolute_import, unicode_literals | ||
| import re | ||
| import string | ||
| from collections import Mapping, OrderedDict | ||
| from kombu import Queue | ||
| from celery.exceptions import QueueNotFound | ||
| from celery.five import items, string_t | ||
| from celery.utils.collections import lpmerge | ||
| @@ -8,8 +8,7 @@ | ||
| from kombu.exceptions import OperationalError | ||
| from kombu.utils.uuid import uuid | ||
| from celery import current_app, group | ||
| from celery import states | ||
| from celery import current_app, group, states | ||
| from celery._state import _task_stack | ||
| from celery.canvas import signature | ||
| from celery.exceptions import Ignore, MaxRetriesExceededError, Reject, Retry | ||
| @@ -1006,4 +1005,6 @@ def backend(self, value): # noqa | ||
| @property | ||
| def __name__(self): | ||
| return self.__class__.__name__ | ||
| BaseTask = Task # noqa: E305 XXX compat alias | ||
| @@ -6,42 +6,43 @@ | ||
| """ | ||
| from __future__ import absolute_import, unicode_literals | ||
| # ## --- | ||
| # This is the heart of the worker, the inner loop so to speak. | ||
| # It used to be split up into nice little classes and methods, | ||
| # but in the end it only resulted in bad performance and horrible tracebacks, | ||
| # so instead we now use one closure per task class. | ||
| # pylint: disable=redefined-outer-name | ||
| # We cache globals and attribute lookups, so disable this warning. | ||
| # pylint: disable=broad-except | ||
| # We know what we're doing... | ||
| import logging | ||
| import os | ||
| import sys | ||
| from collections import namedtuple | ||
| from warnings import warn | ||
| from billiard.einfo import ExceptionInfo | ||
| from kombu.exceptions import EncodeError | ||
| from kombu.serialization import loads as loads_message, prepare_accept_content | ||
| from kombu.serialization import loads as loads_message | ||
| from kombu.serialization import prepare_accept_content | ||
| from kombu.utils.encoding import safe_repr, safe_str | ||
| from celery import current_app, group | ||
| from celery import states, signals | ||
| from celery import current_app, group, signals, states | ||
| from celery._state import _task_stack | ||
| from celery.app.task import Task as BaseTask, Context | ||
| from celery.exceptions import Ignore, Reject, Retry, InvalidTaskError | ||
| from celery.app.task import Context | ||
| from celery.app.task import Task as BaseTask | ||
| from celery.exceptions import Ignore, InvalidTaskError, Reject, Retry | ||
| from celery.five import monotonic, text_t | ||
| from celery.utils.log import get_logger | ||
| from celery.utils.nodenames import gethostname | ||
| from celery.utils.objects import mro_lookup | ||
| from celery.utils.saferepr import saferepr | ||
| from celery.utils.serialization import ( | ||
| get_pickleable_exception, get_pickled_exception, get_pickleable_etype, | ||
| ) | ||
| from celery.utils.serialization import (get_pickleable_etype, | ||
| get_pickleable_exception, | ||
| get_pickled_exception) | ||
| # ## --- | ||
| # This is the heart of the worker, the inner loop so to speak. | ||
| # It used to be split up into nice little classes and methods, | ||
| # but in the end it only resulted in bad performance and horrible tracebacks, | ||
| # so instead we now use one closure per task class. | ||
| # pylint: disable=redefined-outer-name | ||
| # We cache globals and attribute lookups, so disable this warning. | ||
| # pylint: disable=broad-except | ||
| # We know what we're doing... | ||
| __all__ = [ | ||
| 'TraceInfo', 'build_tracer', 'trace_task', | ||
| @@ -515,6 +516,8 @@ def _trace_task_ret(name, uuid, request, body, content_type, | ||
| R, I, T, Rstr = trace_task(app.tasks[name], | ||
| uuid, args, kwargs, request, app=app) | ||
| return (1, R, T) if I else (0, Rstr, T) | ||
| trace_task_ret = _trace_task_ret # noqa: E305 | ||
| @@ -5,7 +5,6 @@ | ||
| import os | ||
| import platform as _platform | ||
| import re | ||
| from collections import Mapping, namedtuple | ||
| from copy import deepcopy | ||
| from types import ModuleType | ||
| @@ -16,13 +15,11 @@ | ||
| from celery.five import items, keys, string_t, values | ||
| from celery.platforms import pyimplementation | ||
| from celery.utils.collections import ConfigurationView | ||
| from celery.utils.imports import import_from_cwd, qualname, symbol_by_name | ||
| from celery.utils.text import pretty | ||
| from celery.utils.imports import import_from_cwd, symbol_by_name, qualname | ||
| from .defaults import ( | ||
| _TO_NEW_KEY, _TO_OLD_KEY, _OLD_DEFAULTS, _OLD_SETTING_KEYS, | ||
| DEFAULTS, SETTING_KEYS, find, | ||
| ) | ||
| from .defaults import (_OLD_DEFAULTS, _OLD_SETTING_KEYS, _TO_NEW_KEY, | ||
| _TO_OLD_KEY, DEFAULTS, SETTING_KEYS, find) | ||
| __all__ = [ | ||
| 'Settings', 'appstr', 'bugreport', | ||
Oops, something went wrong.