marked wip as such

This commit is contained in:
Romain Dorgueil
2016-12-09 09:59:58 +01:00
parent e7f316c048
commit e7a5fe3eed
2 changed files with 4 additions and 4 deletions

View File

@ -43,6 +43,7 @@ class ExecutorStrategy(Strategy):
return self.context_type(graph) return self.context_type(graph)
def execute(self, graph, *args, **kwargs): def execute(self, graph, *args, **kwargs):
raise NotImplementedError()
context = self.create_context(graph) context = self.create_context(graph)
for i in graph.outputs_of(BEGIN): for i in graph.outputs_of(BEGIN):
@ -55,6 +56,8 @@ class ExecutorStrategy(Strategy):
f = self.executor.submit(self.components[idx], *args, **kwargs) f = self.executor.submit(self.components[idx], *args, **kwargs)
self.running.add(f) self.running.add(f)
idx = i
@f.add_done_callback @f.add_done_callback
def on_component_done(f): def on_component_done(f):
nonlocal self, idx nonlocal self, idx

View File

@ -1,6 +1,5 @@
from bonobo.strategy import NaiveStrategy, ExecutorStrategy
from bonobo.core.graph import Graph from bonobo.core.graph import Graph
from bonobo.core.strategy import NaiveStrategy, ExecutorStrategy
def extract(): def extract():
@ -26,5 +25,3 @@ if __name__ == '__main__':
s = ExecutorStrategy() s = ExecutorStrategy()
s.execute(etl) s.execute(etl)