소스 검색

Builtin apply() is deprecated, avoid using it.

Branko Čibej 14 년 전
부모
커밋
5b98ad75ee
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      celery/result.py

+ 2 - 1
celery/result.py

@@ -447,7 +447,8 @@ class EagerResult(BaseAsyncResult):
                                  self._state, self._traceback))
 
     def __copy__(self):
-        return apply(*self.__reduce__())
+        cls, attrs = self.__reduce__()
+        return cls(*attrs)
 
     def successful(self):
         """Returns :const:`True` if the task executed without failure."""