Skip to content

Commit

Permalink
Merge pull request #33 from notAI-tech/bedapudi6788-patch-1
Browse files Browse the repository at this point in the history
Configurable num workers via NUM_WORKERS env variable
  • Loading branch information
preetham committed Aug 28, 2020
2 parents 4da53bf + f62533b commit c94af6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ autopep8==1.4.4
awscli==1.16.196
babel==2.7.0
bandit==1.6.2
bleach==3.1.0
bleach==3.1.1
botocore==1.12.186
certifi==2019.6.16
chardet==3.0.4
Expand Down
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 c94af6e

Please sign in to comment.