From e701e9d0dfe6fe514307e2bee4e7fb5587c9fd8c Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Tue, 26 Mar 2024 10:55:08 +0000 Subject: [PATCH] remove facade status property and call directly on underlying executor --- parsl/jobs/job_status_poller.py | 12 ++---------- parsl/jobs/strategy.py | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/parsl/jobs/job_status_poller.py b/parsl/jobs/job_status_poller.py index 3a307a054c..33130b6e0e 100644 --- a/parsl/jobs/job_status_poller.py +++ b/parsl/jobs/job_status_poller.py @@ -56,14 +56,6 @@ def send_monitoring_info(self, status: Dict) -> None: logger.debug("Sending message {} to hub from job status poller".format(msg)) self.hub_channel.send_pyobj((MessageType.BLOCK_INFO, msg)) - @property - def status(self) -> Dict[str, JobStatus]: - """Return the status of all jobs/blocks of the executor of this poller. - - :return: a dictionary mapping block ids (in string) to job status - """ - return self.executor.status() - @property def executor(self) -> BlockProviderExecutor: return self._executor @@ -118,7 +110,7 @@ def poll(self) -> None: def _run_error_handlers(self, status: List[PolledExecutorFacade]) -> None: for es in status: - es.executor.handle_errors(es.status) + es.executor.handle_errors(es.executor.status()) def _update_state(self) -> None: for item in self._poll_items: @@ -141,7 +133,7 @@ def close(self): # cancelling, but it is safe to be more, as the scaling # code will cope with being asked to cancel more blocks # than exist. - block_count = len(pi.status) + block_count = len(pi.executor.status()) pi.scale_in(block_count) else: # and bad_state_is_set diff --git a/parsl/jobs/strategy.py b/parsl/jobs/strategy.py index b8766be287..7caaa48a4a 100644 --- a/parsl/jobs/strategy.py +++ b/parsl/jobs/strategy.py @@ -199,7 +199,7 @@ def _general_strategy(self, status_list, *, strategy_type): # Tasks that are either pending completion active_tasks = executor.outstanding - status = exec_status.status + status = exec_status.executor.status() # FIXME we need to handle case where provider does not define these # FIXME probably more of this logic should be moved to the provider