Skip to content

Commit

Permalink
Do not duplicate executor polling interval in PollingExecutorFacade (#…
Browse files Browse the repository at this point in the history
…3321)

This is part of work to move JobStatusPoller facade state into other classes, as part of job handling rearrangements in PR #3293

This value is constant, in both executors and in PollingExecutorFacade.

This PR should not change behaviour
  • Loading branch information
benclifford authored Apr 9, 2024
1 parent 43f97af commit 9f24637
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions parsl/jobs/job_status_poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class PolledExecutorFacade:
def __init__(self, executor: BlockProviderExecutor, dfk: Optional["parsl.dataflow.dflow.DataFlowKernel"] = None):
self._executor = executor
self._interval = executor.status_polling_interval
self._last_poll_time = 0.0
self._status = {} # type: Dict[str, JobStatus]

Expand All @@ -36,7 +35,7 @@ def __init__(self, executor: BlockProviderExecutor, dfk: Optional["parsl.dataflo
logger.info("Monitoring enabled on job status poller")

def _should_poll(self, now: float) -> bool:
return now >= self._last_poll_time + self._interval
return now >= self._last_poll_time + self._executor.status_polling_interval

def poll(self, now: float) -> None:
if self._should_poll(now):
Expand Down

0 comments on commit 9f24637

Please sign in to comment.