| 12345678910111213141516171819202122232425262728293031323334353637383940414243 | # -*- coding: utf-8 -*-"""celery.decorators✞==================Deprecated decorators, use `celery.task.task`,and `celery.task.periodic_task` instead.The new decorators does not support magic keyword arguments.:copyright: (c) 2009 - 2011 by Ask Solem.:license: BSD, see LICENSE for more details."""from __future__ import absolute_importimport warningsfrom . import task as _taskfrom .exceptions import CDeprecationWarningwarnings.warn(CDeprecationWarning("""The `celery.decorators` module and the magic keyword argumentsare pending deprecation and will be deprecated in 2.4, then removedin 3.0.`task.request` should be used instead of magic keyword arguments,and `celery.task.task` used instead of `celery.decorators.task`.See the 2.2 Changelog for more information."""))def task(*args, **kwargs):  # ✞    kwargs.setdefault("accept_magic_kwargs", True)    return _task.task(*args, **kwargs)def periodic_task(*args, **kwargs):  # ✞    kwargs.setdefault("accept_magic_kwargs", True)    return _task.periodic_task(*args, **kwargs)
 |