Skip to content

Commit

Permalink
Bring status next to poll_facade which is the only user
Browse files Browse the repository at this point in the history
changed behaviour: none
  • Loading branch information
benclifford committed Jul 16, 2024
1 parent 91f814b commit 9fa50e5
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions parsl/executors/status_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,6 @@ def outstanding(self) -> int:
raise NotImplementedError("Classes inheriting from BlockProviderExecutor must implement "
"outstanding()")

def status(self) -> Dict[str, JobStatus]:
"""Return the status of all jobs/blocks currently known to this executor.
:return: a dictionary mapping block ids (in string) to job status
"""
if self._provider:
block_ids, job_ids = self._get_block_and_job_ids()
status = self._make_status_dict(block_ids, self._provider.status(job_ids))
else:
status = {}
status.update(self._simulated_status)

return status

def set_bad_state_and_fail_all(self, exception: Exception):
"""Allows external error handlers to mark this executor as irrecoverably bad and cause
all tasks submitted to it now and in the future to fail. The executor is responsible
Expand Down Expand Up @@ -317,6 +303,20 @@ def poll_facade(self) -> None:
if delta_status:
self.send_monitoring_info(delta_status)

def status(self) -> Dict[str, JobStatus]:
"""Return the status of all jobs/blocks currently known to this executor.
:return: a dictionary mapping block ids (in string) to job status
"""
if self._provider:
block_ids, job_ids = self._get_block_and_job_ids()
status = self._make_status_dict(block_ids, self._provider.status(job_ids))
else:
status = {}
status.update(self._simulated_status)

return status

@property
def status_facade(self) -> Dict[str, JobStatus]:
"""Return the status of all jobs/blocks of the executor of this poller.
Expand Down

0 comments on commit 9fa50e5

Please sign in to comment.