Skip to content

Commit

Permalink
! try_except variant tryout
Browse files Browse the repository at this point in the history
  • Loading branch information
ALERTua committed Aug 5, 2024
1 parent 2b39a3e commit 54215ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rozetka/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ def _worker(*worker_args):
fnc_args = fnc_args or []
try:
__worker = _worker(*fnc_args)
except Exception as e:
if "thread failed to start" in str(e):
except RuntimeError as e:
if "thread failed to start" in str(e) or "can't start new thread" in str(e):
threads_len = len(ThreadWorkerManager.allWorkers.keys())
LOG.exception(f"Threads Limit Reached {threads_len}", exc_info=True)
LOG.debug(f"Waiting for {len(workers)} workers to finish")
Expand Down

0 comments on commit 54215ed

Please sign in to comment.