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