__init__.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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, 17)
  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( # pragma: no cover
  40. __name__,
  41. by_module={
  42. 'celery.app': ['Celery', 'bugreport', 'shared_task'],
  43. 'celery.app.task': ['Task'],
  44. 'celery._state': ['current_app', 'current_task'],
  45. 'celery.canvas': ['chain', 'chord', 'chunks', 'group',
  46. 'subtask', 'xmap', 'xstarmap'],
  47. 'celery.utils': ['uuid'],
  48. },
  49. direct={'task': 'celery.task'},
  50. __package__='celery', __file__=__file__,
  51. __path__=__path__, __doc__=__doc__, __version__=__version__,
  52. __author__=__author__, __contact__=__contact__,
  53. __homepage__=__homepage__, __docformat__=__docformat__,
  54. VERSION=VERSION, SERIES=SERIES, VERSION_BANNER=VERSION_BANNER,
  55. )