Skip to content

Commit

Permalink
fix: fixed type on env var for symlink workers
Browse files Browse the repository at this point in the history
  • Loading branch information
dreulavelle committed Sep 22, 2024
1 parent 039a3db commit 5c50cc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/program/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ def _init_db_from_symlinks(self):

task = progress.add_task("Enriching items with metadata", total=len(items), log="")
with Live(progress, console=console, refresh_per_second=10):
with ThreadPoolExecutor(max_workers=os.getenv("SYMLINK_MAX_WORKERS", 4)) as executor: # testing between 4 and 8
workers = os.getenv("SYMLINK_MAX_WORKERS", 4)
with ThreadPoolExecutor(max_workers=int(workers)) as executor:
future_to_item = {executor.submit(self._enhance_item, item): item for item in items if isinstance(item, (Movie, Show))}
for future in as_completed(future_to_item):
item = future_to_item[future]
Expand Down

0 comments on commit 5c50cc6

Please sign in to comment.