Skip to content

Commit

Permalink
Fix MAX_PROCS float to int and calc
Browse files Browse the repository at this point in the history
  • Loading branch information
polsala committed Aug 4, 2023
1 parent a6afa5f commit 714e993
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoworker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
from osconf import config_from_environment


MAX_PROCS = max(mp.cpu_count() - os.getloadavg()[0], 0) + 1
#MAX_PROCS = max(mp.cpu_count() - os.getloadavg()[0], 0) + 1
MAX_PROCS = int(max((mp.cpu_count() * (1 - os.getloadavg()[0]), 0)) +1)
"""Number of maximum procs we can run
"""

Expand Down

0 comments on commit 714e993

Please sign in to comment.