Explorar o código

pickling regen must give list not generator

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

+ 3 - 0
celery/utils/functional.py

@@ -290,6 +290,9 @@ class _regen(UserList, list):
     def __init__(self, it):
     def __init__(self, it):
         self.__it = it
         self.__it = it
 
 
+    def __reduce__(self):
+        return list, (self.data, )
+
     @cached_property
     @cached_property
     def data(self):
     def data(self):
         return list(self.__it)
         return list(self.__it)