Permalink
Browse files

Fixes missing import

  • Loading branch information...
1 parent 55f9086 commit 1baa388364207b0710bf55d5454e7bcc747cc78d @ask committed Feb 15, 2012
Showing with 5 additions and 0 deletions.
  1. +1 −0 celery/app/task/__init__.py
  2. +4 −0 celery/tests/test_task/__init__.py
View
1 celery/app/task/__init__.py
@@ -23,6 +23,7 @@
from ...result import EagerResult
from ...utils import (fun_takes_kwargs, instantiate,
mattrgetter, uuid, maybe_reraise)
+from ...utils.compat import fun_of_method
from ...utils.mail import ErrorMail
COMPAT_CLASSMETHODS = ("get_logger", "establish_connection",
View
4 celery/tests/test_task/__init__.py
@@ -59,6 +59,7 @@ def run(self, **kwargs):
class RetryTask(task.Task):
max_retries = 3
iterations = 0
+ accept_magic_kwargs = True
def run(self, arg1, arg2, kwarg=1, max_retries=None, care=True):
self.__class__.iterations += 1
@@ -74,6 +75,7 @@ def run(self, arg1, arg2, kwarg=1, max_retries=None, care=True):
class RetryTaskNoArgs(task.Task):
max_retries = 3
iterations = 0
+ accept_magic_kwargs = True
def run(self, **kwargs):
self.__class__.iterations += 1
@@ -89,6 +91,7 @@ class RetryTaskMockApply(task.Task):
max_retries = 3
iterations = 0
applied = 0
+ accept_magic_kwargs = True
def run(self, arg1, arg2, kwarg=1, **kwargs):
self.__class__.iterations += 1
@@ -112,6 +115,7 @@ class MyCustomException(Exception):
class RetryTaskCustomExc(task.Task):
max_retries = 3
iterations = 0
+ accept_magic_kwargs = True
def run(self, arg1, arg2, kwarg=1, **kwargs):
self.__class__.iterations += 1

0 comments on commit 1baa388

Please sign in to comment.