Skip to content

Commit

Permalink
! bullseye tryout
Browse files Browse the repository at this point in the history
  • Loading branch information
ALERTua committed Aug 4, 2024
1 parent b8dc9dc commit 9fdbbe0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rozetka/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ def _worker(*worker_args, **worker_kwargs):
def fncs_map(tuple_of_fncs, *tuple_of_args):
workers = []
for fnc, fnc_args in zip_longest(tuple_of_fncs, tuple_of_args):
active_workers = ThreadWorkerManager.list(active_only=True)
all_workers = ThreadWorkerManager.list()
LOG.debug(f"active workers: {len(active_workers)}, all_workers: {len(all_workers)}")
active_workers = ThreadWorkerManager.list(active_only=True) or []
all_workers = ThreadWorkerManager.list() or []
LOG.warning(f"active workers: {len(active_workers)}, all_workers: {len(all_workers)}")

while ((active_workers := ThreadWorkerManager.list())
and ((workers_len := len(active_workers)) > constants.THREADS_MAX)):
LOG.info(f"{workers_len} active workers. Waiting...")
LOG.warning(f"{workers_len} active workers. Waiting...")
ThreadWorkerManager.wait(wait_all=True)

@worker
Expand Down

0 comments on commit 9fdbbe0

Please sign in to comment.