in submitit/core/core.py [0:0]
def update(self) -> None:
"""Updates the info of all registered jobs with a call to sacct"""
command = self._make_command()
if command is None:
return
self._num_calls += 1
try:
logger.get_logger().debug(f"Call #{self.num_calls} - Command {' '.join(command)}")
self._output = subprocess.check_output(command, shell=False)
except Exception as e:
logger.get_logger().warning(
f"Call #{self.num_calls} - Bypassing sacct error {e}, status may be inaccurate."
)
else:
self._info_dict.update(self.read_info(self._output))
self._last_status_check = _time.time()
# check for finished jobs
to_check = self._registered - self._finished
for job_id in to_check:
if self.is_done(job_id, mode="cache"):
self._finished.add(job_id)