Skip to content

Commit cd83b98

Browse files
committed
remove facade status property and call directly on underlying executor
1 parent 2d28116 commit cd83b98

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

parsl/jobs/job_status_poller.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ def send_monitoring_info(self, status: Dict) -> None:
5656
logger.debug("Sending message {} to hub from job status poller".format(msg))
5757
self.hub_channel.send_pyobj((MessageType.BLOCK_INFO, msg))
5858

59-
@property
60-
def status(self) -> Dict[str, JobStatus]:
61-
"""Return the status of all jobs/blocks of the executor of this poller.
62-
63-
:return: a dictionary mapping block ids (in string) to job status
64-
"""
65-
return self.executor.status()
66-
6759
@property
6860
def executor(self) -> BlockProviderExecutor:
6961
return self._executor
@@ -118,7 +110,7 @@ def poll(self) -> None:
118110

119111
def _run_error_handlers(self, status: List[PolledExecutorFacade]) -> None:
120112
for es in status:
121-
es.executor.handle_errors(es.status)
113+
es.executor.handle_errors(es.executor.status())
122114

123115
def _update_state(self) -> None:
124116
for item in self._poll_items:
@@ -141,7 +133,7 @@ def close(self):
141133
# cancelling, but it is safe to be more, as the scaling
142134
# code will cope with being asked to cancel more blocks
143135
# than exist.
144-
block_count = len(pi.status)
136+
block_count = len(pi.executor.status())
145137
pi.scale_in(block_count)
146138

147139
else: # and bad_state_is_set

parsl/jobs/strategy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def _general_strategy(self, status_list, *, strategy_type):
199199
# Tasks that are either pending completion
200200
active_tasks = executor.outstanding
201201

202-
status = exec_status.status
202+
status = exec_status.executor.status()
203203

204204
# FIXME we need to handle case where provider does not define these
205205
# FIXME probably more of this logic should be moved to the provider

0 commit comments

Comments
 (0)