marked wip as such
This commit is contained in:
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user