Skip to content

Commit

Permalink
remove facade status property and call directly on underlying executor
Browse files Browse the repository at this point in the history
  • Loading branch information
benclifford committed Apr 9, 2024
1 parent e2b8617 commit bc03ec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions parsl/jobs/job_status_poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ def send_monitoring_info(self, status: Dict) -> None:
logger.debug("Sending message {} to hub from job status poller".format(msg))
self._monitoring.send((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
Expand Down Expand Up @@ -104,7 +96,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._executor_facades:
Expand All @@ -127,7 +119,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(ef.status)
block_count = len(ef.executor.status())
ef.scale_in(block_count)

else: # and bad_state_is_set
Expand Down
2 changes: 1 addition & 1 deletion parsl/jobs/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def _general_strategy(self, executor_facades, *, strategy_type):
# Tasks that are either pending completion
active_tasks = executor.outstanding

status = ef.status
status = ef.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
Expand Down

0 comments on commit bc03ec5

Please sign in to comment.