in submitit/core/core.py [0:0]
def update_if_long_enough(self, mode: str) -> None:
"""Updates if forced to, or if the delay is reached
(Force-updates with less than 1ms delay are ignored)
Also checks for finished jobs
"""
assert mode in ["standard", "force", "cache"]
if mode == "cache":
return
last_check_delta = _time.time() - self._last_status_check
last_job_delta = _time.time() - self._start_time
refresh_delay = min(self._delay_s, max(2, last_job_delta / 2))
if mode == "force":
refresh_delay = 0.001
# the following will call update at time 0s, 2s, 4, 8, 16, 32, 64, 124 (delta 60), 184 (delta 60) etc... of last added job
# (for delay_s = 60)
if last_check_delta > refresh_delay:
self.update()