From 3e2444ccb69d6c9aa394a0de0a987260c8bd2a3d Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 28 Jul 2018 16:05:43 +0100 Subject: [PATCH 1/3] bugfix: set max workers to the actual node count in graph. --- bonobo/execution/strategies/executor.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bonobo/execution/strategies/executor.py b/bonobo/execution/strategies/executor.py index 1e2d45f..8f33574 100644 --- a/bonobo/execution/strategies/executor.py +++ b/bonobo/execution/strategies/executor.py @@ -17,7 +17,7 @@ class ExecutorStrategy(Strategy): executor_factory = Executor - def create_executor(self): + def create_executor(self, graph): return self.executor_factory() def execute(self, graph, **kwargs): @@ -26,7 +26,7 @@ class ExecutorStrategy(Strategy): futures = [] - with self.create_executor() as executor: + with self.create_executor(graph) as executor: try: context.start(self.get_starter(executor, futures)) except: @@ -69,6 +69,12 @@ class ExecutorStrategy(Strategy): class ThreadPoolExecutorStrategy(ExecutorStrategy): executor_factory = ThreadPoolExecutor + def create_executor(self, graph): + return self.executor_factory(max_workers=len(graph)) + class ProcessPoolExecutorStrategy(ExecutorStrategy): executor_factory = ProcessPoolExecutor + + def create_executor(self, graph): + return self.executor_factory(max_workers=len(graph)) From 9c7bc8a2f0f32c96b641e713055663a135f75b00 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 28 Jul 2018 16:22:23 +0100 Subject: [PATCH 2/3] ci: adds 3.7, 3.7-dev and nightly --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c27e1a3..f95717d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,9 @@ python: - 3.5-dev - 3.6 - 3.6-dev -# - 3.7-dev -# - nightly + - 3.7 + - 3.7-dev + - nightly install: - make install-dev - pip install coveralls From bb6199185143796dc4f75e03201dd04899f9bba1 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 28 Jul 2018 16:25:39 +0100 Subject: [PATCH 3/3] ci: 3.7 not existing in travis yet... lets stay on 3.7-dev --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f95717d..6f0c54f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ python: - 3.5-dev - 3.6 - 3.6-dev - - 3.7 + # - 3.7 - 3.7-dev - nightly install: