Skip to content

Commit 4bda085

Browse files
authored
patch20250130: make the concurrency of uploading jobsbs configurable (#200)
* make the concurrency of uploading jobsbs configurable * also make upload_chunk_size configurable
1 parent a5558cc commit 4bda085

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/configs/app_config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Env:
1313
# NOTE: there is a limitation on minio that
1414
# the multipart number is 10000. so we set
1515
# the chunk_size as 20MB -> total 200GB
16-
chunk_size = 1024 * 1024 * 20 # MB
16+
chunk_size = ConfigClass.upload_chunk_size # MB
1717
resilient_retry = 3
1818
resilient_backoff = 1
1919
resilient_retry_interval = 1 # seconds
@@ -31,7 +31,7 @@ class Env:
3131
# set hard limit for pending jobs, otherwise cli will consume all memory
3232
# to cache jobs. If later on the speed of chunk deliver become faster, we
3333
# can increase the concurrency number.
34-
num_of_jobs = 20
34+
num_of_jobs = ConfigClass.concurrent_job_limit
3535

3636
github_url = 'PilotDataPlatform/cli'
3737

app/configs/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class Settings(BaseSettings):
3737
apikey_endpoint: str = 'api-key'
3838

3939
upload_batch_size: int = 100
40+
concurrent_job_limit: int = 10
41+
upload_chunk_size: int = 1024 * 1024 * 20 # 20MB
4042

4143
def __init__(self, **data):
4244
super().__init__(**data)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "app"
3-
version = "3.12.0"
3+
version = "3.12.1"
44
description = "This service is designed to support pilot platform"
55
authors = ["Indoc Systems"]
66

0 commit comments

Comments
 (0)