Explorar o código

AsyncResult.__copy__ no longer evaluates self.backend instance

Ask Solem %!s(int64=11) %!d(string=hai) anos
pai
achega
b283b194c1
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      celery/result.py

+ 3 - 2
celery/result.py

@@ -221,8 +221,9 @@ class AsyncResult(ResultBase):
         return not self.__eq__(other)
 
     def __copy__(self):
-        r = self.__reduce__()
-        return r[0](*r[1])
+        return self.__class__(
+            self.id, self.backend, self.task_name, self.app, self.parent,
+        )
 
     def __reduce__(self):
         return self.__class__, self.__reduce_args__()