Skip to content

Commit 125493f

Browse files
authored
Perform initial block scaling immediately (#3785)
Prior to PR #3282, initial block scaling happened at DFK startup. PR #3282 moved initial scaling to happen inside the scaling strategy, alongside other scaling. This meant that initial block scaling only happens on the first poll cycle, by default 5 seconds after startup. This PR makes a scaling strategy run happen at startup and then every subsequent poll cycle - removing that one-poll-cycle second delay. # Changed Behaviour parsl blocks will start up faster. ## Type of change - Bug fix
1 parent 124aa7e commit 125493f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

parsl/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ def __init__(self, callback: Callable, *args: Any, interval: Union[float, int] =
340340
self._thread.start()
341341

342342
def _wake_up_timer(self) -> None:
343+
self.make_callback()
344+
343345
while not self._kill_event.wait(self.interval):
344346
self.make_callback()
345347

0 commit comments

Comments
 (0)