Skip to content

Commit 114f373

Browse files
committed
rename status as an authoritative status regenerator
it can be subclassed to add in executor-specific status (as happens with htex)
1 parent 7989d54 commit 114f373

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

parsl/executors/high_throughput/executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,8 @@ def _get_launch_command(self, block_id: str) -> str:
787787
launch_cmd = self.launch_cmd.format(block_id=block_id)
788788
return launch_cmd
789789

790-
def status(self) -> Dict[str, JobStatus]:
791-
job_status = super().status()
790+
def _regenerate_combined_status(self) -> Dict[str, JobStatus]:
791+
job_status = super()._regenerate_combined_status()
792792
connected_blocks = self.connected_blocks()
793793
for job_id in job_status:
794794
job_info = job_status[job_id]

parsl/executors/status_handling.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(self, *,
7676

7777
# errors can happen during the submit call to the provider; this is used
7878
# to keep track of such errors so that they can be handled in one place
79-
# together with errors reported by status()
79+
# together with errors reported by _regenerate_combined_status()
8080
self._simulated_status: Dict[str, JobStatus] = {}
8181

8282
# this stores an approximation (sometimes delayed) of the latest status
@@ -106,7 +106,7 @@ def status_polling_interval(self):
106106
In practice, at least given the current situation, the executor uses a single task provider
107107
and this method is a delegate to the corresponding method in the provider.
108108
109-
:return: the number of seconds to wait between calls to status() or zero if no polling
109+
:return: the number of seconds to wait between calls to _regenerate_combined_status() or zero if no polling
110110
should be done
111111
"""
112112
if self._provider is None:
@@ -296,7 +296,7 @@ def poll_facade(self) -> None:
296296
now = time.time()
297297
if now >= self._last_poll_time + self.status_polling_interval:
298298
previous_status = self._status
299-
self._status = self.status()
299+
self._status = self._regenerate_combined_status()
300300
self._last_poll_time = now
301301
delta_status = {}
302302
for block_id in self._status:
@@ -307,7 +307,7 @@ def poll_facade(self) -> None:
307307
if delta_status:
308308
self.send_monitoring_info(delta_status)
309309

310-
def status(self) -> Dict[str, JobStatus]:
310+
def _regenerate_combined_status(self) -> Dict[str, JobStatus]:
311311
"""Return the status of all jobs/blocks currently known to this executor.
312312
313313
:return: a dictionary mapping block ids (in string) to job status

0 commit comments

Comments
 (0)