File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -534,15 +534,14 @@ def _query_resource(
534534 else None
535535 )
536536
537- byte_data = self ._multi_thread (
538- self ._query_open_data ,
539- list (s3_params_list .values ()),
540- pbar , # type: ignore
541- )
542-
543- unzipped_chunks = []
544- for docs , _ , _ in byte_data :
545- unzipped_chunks .append (docs )
537+ unzipped_chunks = [
538+ docs
539+ for docs , _ , _ in self ._multi_thread (
540+ self ._query_open_data ,
541+ list (s3_params_list .values ()),
542+ pbar , # type: ignore
543+ )
544+ ]
546545
547546 data = {
548547 "data" : list (chain .from_iterable (unzipped_chunks )),
Original file line number Diff line number Diff line change 88from mp_api .client import __file__ as root_dir
99
1010PMG_SETTINGS = _load_pmg_settings ()
11+ _NUM_PARALLEL_REQUESTS = min (PMG_SETTINGS .get ("MPRESTER_NUM_PARALLEL_REQUESTS" , 4 ), 4 )
1112_MAX_RETRIES = min (PMG_SETTINGS .get ("MPRESTER_MAX_RETRIES" , 3 ), 3 )
1213_MUTE_PROGRESS_BAR = PMG_SETTINGS .get ("MPRESTER_MUTE_PROGRESS_BARS" , False )
1314_MAX_LIST_LENGTH = min (PMG_SETTINGS .get ("MPRESTER_MAX_LIST_LENGTH" , 10000 ), 10000 )
@@ -26,6 +27,11 @@ class MAPIClientSettings(BaseSettings):
2627 description = "Directory with test files" ,
2728 )
2829
30+ NUM_PARALLEL_REQUESTS : int = Field (
31+ _NUM_PARALLEL_REQUESTS ,
32+ description = "Number of parallel requests to send." ,
33+ )
34+
2935 MAX_RETRIES : int = Field (
3036 _MAX_RETRIES , description = "Maximum number of retries for requests."
3137 )
You can’t perform that action at this time.
0 commit comments