Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch20250130: make the concurrency of uploading jobsbs configurable #200

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/configs/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Env:
# NOTE: there is a limitation on minio that
# the multipart number is 10000. so we set
# the chunk_size as 20MB -> total 200GB
chunk_size = 1024 * 1024 * 20 # MB
chunk_size = ConfigClass.upload_chunk_size # MB
resilient_retry = 3
resilient_backoff = 1
resilient_retry_interval = 1 # seconds
Expand All @@ -31,7 +31,7 @@ class Env:
# set hard limit for pending jobs, otherwise cli will consume all memory
# to cache jobs. If later on the speed of chunk deliver become faster, we
# can increase the concurrency number.
num_of_jobs = 20
num_of_jobs = ConfigClass.concurrent_job_limit

github_url = 'PilotDataPlatform/cli'

Expand Down
2 changes: 2 additions & 0 deletions app/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Settings(BaseSettings):
apikey_endpoint: str = 'api-key'

upload_batch_size: int = 100
concurrent_job_limit: int = 10
upload_chunk_size: int = 1024 * 1024 * 20 # 20MB

def __init__(self, **data):
super().__init__(**data)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "app"
version = "3.12.0"
version = "3.12.1"
description = "This service is designed to support pilot platform"
authors = ["Indoc Systems"]

Expand Down
Loading