From e7a5fe3eed0ec77285b2cb7175601609fc89741a Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Fri, 9 Dec 2016 09:59:58 +0100 Subject: [PATCH] marked wip as such --- bonobo/core/strategy.py | 3 +++ examples/basic_extract_transform_load_of_strings.py | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bonobo/core/strategy.py b/bonobo/core/strategy.py index 1e34903..28f508d 100644 --- a/bonobo/core/strategy.py +++ b/bonobo/core/strategy.py @@ -43,6 +43,7 @@ class ExecutorStrategy(Strategy): return self.context_type(graph) def execute(self, graph, *args, **kwargs): + raise NotImplementedError() context = self.create_context(graph) for i in graph.outputs_of(BEGIN): @@ -55,6 +56,8 @@ class ExecutorStrategy(Strategy): f = self.executor.submit(self.components[idx], *args, **kwargs) self.running.add(f) + idx = i + @f.add_done_callback def on_component_done(f): nonlocal self, idx diff --git a/examples/basic_extract_transform_load_of_strings.py b/examples/basic_extract_transform_load_of_strings.py index f8305d6..6adc71d 100644 --- a/examples/basic_extract_transform_load_of_strings.py +++ b/examples/basic_extract_transform_load_of_strings.py @@ -1,6 +1,5 @@ -from bonobo.strategy import NaiveStrategy, ExecutorStrategy - from bonobo.core.graph import Graph +from bonobo.core.strategy import NaiveStrategy, ExecutorStrategy def extract(): @@ -26,5 +25,3 @@ if __name__ == '__main__': s = ExecutorStrategy() s.execute(etl) - -