Explorar o código

Added TaskSetResult.__getitem__

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

+ 3 - 0
celery/result.py

@@ -259,6 +259,9 @@ class TaskSetResult(object):
         """``iter(res)`` -> ``res.iterate()``."""
         return self.iterate()
 
+    def __getitem__(self, index):
+        return self.subtasks[index]
+
     def iterate(self):
         """Iterate over the return values of the tasks as they finish
         one by one.