Skip to content

Commit

Permalink
fix cpu_count less than 2 error
Browse files Browse the repository at this point in the history
  • Loading branch information
cwilvx committed Jan 12, 2024
1 parent aba05b3 commit 1cf8e17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lib/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def get_image(_map: tuple[str, Album]):
pass


CPU_COUNT = os.cpu_count() // 2
_cpu_count = os.cpu_count()
CPU_COUNT = _cpu_count // 2 if _cpu_count > 2 else _cpu_count


class ProcessTrackThumbnails:
Expand Down

0 comments on commit 1cf8e17

Please sign in to comment.