Ver Fonte

pickling regen must give list not generator

Ask Solem há 12 anos atrás
pai
commit
1a2e5a1188
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      celery/utils/functional.py

+ 3 - 0
celery/utils/functional.py

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