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 Mar 26, 2024
1 parent e0af6b8 commit e701e9d
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 @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion parsl/jobs/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e701e9d

Please sign in to comment.