Skip to content

Commit bc03ec5

Browse files
committed
remove facade status property and call directly on underlying executor
1 parent e2b8617 commit bc03ec5

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
@@ -42,14 +42,6 @@ def send_monitoring_info(self, status: Dict) -> None:
4242
logger.debug("Sending message {} to hub from job status poller".format(msg))
4343
self._monitoring.send((MessageType.BLOCK_INFO, msg))
4444

45-
@property
46-
def status(self) -> Dict[str, JobStatus]:
47-
"""Return the status of all jobs/blocks of the executor of this poller.
48-
49-
:return: a dictionary mapping block ids (in string) to job status
50-
"""
51-
return self._executor.status()
52-
5345
@property
5446
def executor(self) -> BlockProviderExecutor:
5547
return self._executor
@@ -104,7 +96,7 @@ def poll(self) -> None:
10496

10597
def _run_error_handlers(self, status: List[PolledExecutorFacade]) -> None:
10698
for es in status:
107-
es.executor.handle_errors(es.status)
99+
es.executor.handle_errors(es.executor.status())
108100

109101
def _update_state(self) -> None:
110102
for item in self._executor_facades:
@@ -127,7 +119,7 @@ def close(self):
127119
# cancelling, but it is safe to be more, as the scaling
128120
# code will cope with being asked to cancel more blocks
129121
# than exist.
130-
block_count = len(ef.status)
122+
block_count = len(ef.executor.status())
131123
ef.scale_in(block_count)
132124

133125
else: # and bad_state_is_set

parsl/jobs/strategy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def _general_strategy(self, executor_facades, *, strategy_type):
203203
# Tasks that are either pending completion
204204
active_tasks = executor.outstanding
205205

206-
status = ef.status
206+
status = ef.executor.status()
207207

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

0 commit comments

Comments
 (0)