diff --git a/rozetka/tools/tools.py b/rozetka/tools/tools.py index cc6e35f..1396023 100644 --- a/rozetka/tools/tools.py +++ b/rozetka/tools/tools.py @@ -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