From 3a6219b2beaaaac3c8cde5a40dde524ff37fe114 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Wed, 1 Nov 2023 16:29:43 +0000 Subject: [PATCH] Clarify return value of executor.shutdown Some executors returned constant True; some returned None. No use is made of this return value, so set it to None in the base definition. --- parsl/executors/base.py | 2 +- parsl/executors/taskvine/executor.py | 1 - parsl/executors/threads.py | 3 +-- parsl/executors/workqueue/executor.py | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/parsl/executors/base.py b/parsl/executors/base.py index f9fca513fe..f51d7b0f9d 100644 --- a/parsl/executors/base.py +++ b/parsl/executors/base.py @@ -74,7 +74,7 @@ def submit(self, func: Callable, resource_specification: Dict[str, Any], *args: pass @abstractmethod - def shutdown(self) -> bool: + def shutdown(self) -> None: """Shutdown the executor. This includes all attached resources such as workers and controllers. diff --git a/parsl/executors/taskvine/executor.py b/parsl/executors/taskvine/executor.py index 788616fd8a..cb958ff624 100644 --- a/parsl/executors/taskvine/executor.py +++ b/parsl/executors/taskvine/executor.py @@ -614,7 +614,6 @@ def shutdown(self, *args, **kwargs): self._factory_process.join() logger.debug("TaskVine shutdown completed") - return True @wrap_with_logs def _collect_taskvine_results(self): diff --git a/parsl/executors/threads.py b/parsl/executors/threads.py index cdd44637f2..97c26adb9e 100644 --- a/parsl/executors/threads.py +++ b/parsl/executors/threads.py @@ -72,9 +72,8 @@ def shutdown(self, block=True): """ logger.debug("Shutting down executor, which involves waiting for running tasks to complete") - x = self.executor.shutdown(wait=block) + self.executor.shutdown(wait=block) logger.debug("Done with executor shutdown") - return x def monitor_resources(self): """Resource monitoring sometimes deadlocks when using threads, so this function diff --git a/parsl/executors/workqueue/executor.py b/parsl/executors/workqueue/executor.py index 230b074ff0..243b1c911a 100644 --- a/parsl/executors/workqueue/executor.py +++ b/parsl/executors/workqueue/executor.py @@ -707,7 +707,6 @@ def shutdown(self, *args, **kwargs): self.collector_thread.join() logger.debug("Work Queue shutdown completed") - return True @wrap_with_logs def _collect_work_queue_results(self):