##// END OF EJS Templates
add all completed task IDs to Scheduler.all_done
MinRK -
Show More
@@ -80,15 +80,11 b' class Dependency(set):'
80 if len(self) == 0:
80 if len(self) == 0:
81 return True
81 return True
82 if self.mode == 'all':
82 if self.mode == 'all':
83 for dep in self:
83 return self.issubset(completed)
84 if dep not in completed:
85 return False
86 return True
87 elif self.mode == 'any':
84 elif self.mode == 'any':
88 for com in completed:
85 return not self.isdisjoint(completed)
89 if com in self.dependencies:
86 else:
90 return True
87 raise NotImplementedError("Only any|all supported, not %r"%mode)
91 return False
92
88
93 def as_dict(self):
89 def as_dict(self):
94 """Represent this dependency as a dict. For json compatibility."""
90 """Represent this dependency as a dict. For json compatibility."""
@@ -30,9 +30,9 b' from IPython.external.decorator import decorator'
30
30
31 @decorator
31 @decorator
32 def logged(f,self,*args,**kwargs):
32 def logged(f,self,*args,**kwargs):
33 # print ("#--------------------")
33 print ("#--------------------")
34 # print ("%s(*%s,**%s)"%(f.func_name, args, kwargs))
34 print ("%s(*%s,**%s)"%(f.func_name, args, kwargs))
35 # print ("#--")
35 print ("#--")
36 return f(self,*args, **kwargs)
36 return f(self,*args, **kwargs)
37
37
38 #----------------------------------------------------------------------
38 #----------------------------------------------------------------------
@@ -340,6 +340,7 b' class TaskScheduler(object):'
340 msg_id = parent['msg_id']
340 msg_id = parent['msg_id']
341 self.pending[engine].pop(msg_id)
341 self.pending[engine].pop(msg_id)
342 self.completed[engine].add(msg_id)
342 self.completed[engine].add(msg_id)
343 self.all_done.add(msg_id)
343
344
344 self.update_dependencies(msg_id)
345 self.update_dependencies(msg_id)
345
346
General Comments 0
You need to be logged in to leave comments. Login now