Skip to content

Commit ef634a3

Browse files
committed
do not crash on any single task failing
1 parent d7fce48 commit ef634a3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

coldfront/plugins/slurmrest/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def get_accounts(self) -> list[V0043Account]:
8484
stop=stop_after_attempt(3),
8585
retry=retry_if_not_exception_type(ConnectionError),
8686
before_sleep=before_sleep_log(logging.getLogger(__name__), logging.WARNING),
87+
retry_error_callback=lambda _: None, # move on to the next task
8788
)
8889
def delete_association_user_account(self, username: str, account: str, noop: bool = False) -> None:
8990
if noop:
@@ -176,6 +177,7 @@ def delete_association_user_account(self, username: str, account: str, noop: boo
176177
stop=stop_after_attempt(3),
177178
retry=retry_if_not_exception_type(ConnectionError),
178179
before_sleep=before_sleep_log(logging.getLogger(__name__), logging.WARNING),
180+
retry_error_callback=lambda _: None, # move on to the next task
179181
)
180182
def delete_slurm_account(self, account: str, noop: bool = False) -> None:
181183
if noop:

0 commit comments

Comments
 (0)