__init__.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # -*- coding: utf-8 -*-
  2. """Distributed Task Queue"""
  3. # :copyright: (c) 2009 - 2012 Ask Solem and individual contributors,
  4. # All rights reserved.
  5. # :copyright: (c) 2012 VMware, Inc., All rights reserved.
  6. # :license: BSD (3 Clause), see LICENSE for more details.
  7. from __future__ import absolute_import
  8. SERIES = 'Chiastic Slide'
  9. VERSION = (3, 0, 12)
  10. __version__ = '.'.join(map(str, VERSION[0:3])) + ''.join(VERSION[3:])
  11. __author__ = 'Ask Solem'
  12. __contact__ = 'ask@celeryproject.org'
  13. __homepage__ = 'http://celeryproject.org'
  14. __docformat__ = 'restructuredtext'
  15. __all__ = [
  16. 'Celery', 'bugreport', 'shared_task', 'Task',
  17. 'current_app', 'current_task',
  18. 'chain', 'chord', 'chunks', 'group', 'subtask',
  19. 'xmap', 'xstarmap', 'uuid', 'VERSION', '__version__',
  20. ]
  21. VERSION_BANNER = '%s (%s)' % (__version__, SERIES)
  22. # -eof meta-
  23. STATICA_HACK = True
  24. globals()['kcah_acitats'[::-1].upper()] = False
  25. if STATICA_HACK:
  26. # This is never executed, but tricks static analyzers (PyDev, PyCharm,
  27. # pylint, etc.) into knowing the types of these symbols, and what
  28. # they contain.
  29. from celery.app.base import Celery
  30. from celery.app.utils import bugreport
  31. from celery.app.task import Task
  32. from celery._state import current_app, current_task
  33. from celery.canvas import (
  34. chain, chord, chunks, group, subtask, xmap, xstarmap,
  35. )
  36. from celery.utils import uuid
  37. # Lazy loading
  38. from .__compat__ import recreate_module
  39. old_module, new_module = recreate_module(__name__, # pragma: no cover
  40. by_module={
  41. 'celery.app': ['Celery', 'bugreport', 'shared_task'],
  42. 'celery.app.task': ['Task'],
  43. 'celery._state': ['current_app', 'current_task'],
  44. 'celery.canvas': ['chain', 'chord', 'chunks', 'group',
  45. 'subtask', 'xmap', 'xstarmap'],
  46. 'celery.utils': ['uuid'],
  47. },
  48. direct={'task': 'celery.task'},
  49. __package__='celery', __file__=__file__,
  50. __path__=__path__, __doc__=__doc__, __version__=__version__,
  51. __author__=__author__, __contact__=__contact__,
  52. __homepage__=__homepage__, __docformat__=__docformat__,
  53. VERSION=VERSION, SERIES=SERIES, VERSION_BANNER=VERSION_BANNER,
  54. )