浏览代码

pickling regen must give list not generator

Ask Solem 12 年之前
父节点
当前提交
1a2e5a1188
共有 1 个文件被更改,包括 3 次插入0 次删除
  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)