Skip to content

Commit

Permalink
configurable no_of_workers via NUM_WORKERS env
Browse files Browse the repository at this point in the history
  • Loading branch information
bedapudi6788 committed Aug 28, 2020
1 parent ee78038 commit f62533b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions verifytweet/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def no_of_workers():
twice the cpu count.
"""
if os.getenv('NUM_WORKERS').isdigit():
return int(os.getenv('NUM_WORKERS'))

return multiprocessing.cpu_count() * 2 + 1


Expand Down

0 comments on commit f62533b

Please sign in to comment.