Skip to content

Commit

Permalink
Limit parallel queries to 4 threads
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Dec 8, 2023
1 parent 0a1561a commit 8f0146a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mp_api/client/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from mp_api.client import __file__ as root_dir

PMG_SETTINGS = _load_pmg_settings()
_NUM_PARALLEL_REQUESTS = min(PMG_SETTINGS.get("MPRESTER_NUM_PARALLEL_REQUESTS", 8), 8)
_NUM_PARALLEL_REQUESTS = min(PMG_SETTINGS.get("MPRESTER_NUM_PARALLEL_REQUESTS", 4), 4)
_MAX_RETRIES = min(PMG_SETTINGS.get("MPRESTER_MAX_RETRIES", 3), 3)
_MUTE_PROGRESS_BAR = PMG_SETTINGS.get("MPRESTER_MUTE_PROGRESS_BARS", False)
_MAX_HTTP_URL_LENGTH = PMG_SETTINGS.get("MPRESTER_MAX_HTTP_URL_LENGTH", 2000)
_MAX_LIST_LENGTH = min(PMG_SETTINGS.get("MPRESTER_MAX_LIST_LENGTH", 40000), 40000)
_MAX_LIST_LENGTH = min(PMG_SETTINGS.get("MPRESTER_MAX_LIST_LENGTH", 10000), 10000)

try:
CPU_COUNT = cpu_count()
Expand Down

0 comments on commit 8f0146a

Please sign in to comment.