File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
gooddata-pipelines/gooddata_pipelines/backup_and_restore Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ def _process_batches_in_parallel(
347347 stop_event = threading .Event ()
348348
349349 with ThreadPoolExecutor (
350- max_workers = BackupSettings . MAX_WORKERS
350+ max_workers = self . config . max_workers
351351 ) as executor :
352352 # Set the futures tasks.
353353 futures = []
Original file line number Diff line number Diff line change 1+ # (C) 2025 GoodData Corporation
12import datetime
23from dataclasses import dataclass
34
@@ -22,7 +23,7 @@ class DirNames:
2223
2324@dataclass (frozen = True )
2425class ConcurrencyDefaults :
25- MAX_WORKERS = 2
26+ MAX_WORKERS = 1
2627 DEFAULT_BATCH_SIZE = 100
2728
2829
Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ class BackupRestoreConfig(BaseModel):
8383 description = "Batch size must be greater than 0" ,
8484 ),
8585 ] = Field (default = BackupSettings .DEFAULT_BATCH_SIZE )
86+ max_workers : Annotated [
87+ int ,
88+ Field (
89+ gt = 0 ,
90+ lt = 3 ,
91+ description = "Max workers must be greater than 0 and less than 3" ,
92+ ),
93+ ] = Field (default = BackupSettings .MAX_WORKERS )
8694
8795 @classmethod
8896 def from_yaml (cls , conf_path : str ) -> "BackupRestoreConfig" :
You can’t perform that action at this time.
0 commit comments