From 31a61bb7d4f57f60d8c30a98ac38fb978ff46031 Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Tue, 2 May 2023 12:10:14 +0200 Subject: [PATCH] docs(api): add a comment to explain why the monitoring loop must not raise exception --- antarest/launcher/adapters/slurm_launcher/slurm_launcher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py b/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py index 07e490ff24..8e756cb5fc 100644 --- a/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py +++ b/antarest/launcher/adapters/slurm_launcher/slurm_launcher.py @@ -148,9 +148,12 @@ def _retrieve_running_jobs(self) -> None: def _loop(self) -> None: while self.check_state: + # noinspection PyBroadException try: self._check_studies_state() except Exception: + # To keep the SLURM processing monitoring loop active, exceptions + # are caught and a message is simply displayed in the logs. logger.error( "An uncaught exception occurred in slurm_launcher loop", exc_info=True,