Skip to content

Commit

Permalink
try to add progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
calum-chamberlain committed Jan 9, 2024
1 parent 0cfcab7 commit c28512d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rt_eqcorrscan/database/database_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def _chunksize(
max_workers = max_workers or cpu_count()
chunksize = n_tasks // (max_workers - 1)
chunksize //= divisor
return chunksize
return max(chunksize, 1)


def _workers(executor) -> int:
def _workers(executor) -> Union[int, None]:
if hasattr(executor, '_max_workers'):
return executor._max_workers
return None
Expand Down

0 comments on commit c28512d

Please sign in to comment.