@@ -527,7 +527,7 @@ def __init__(
527
527
disable_resumable_full_refresh : bool = False ,
528
528
message_repository : Optional [MessageRepository ] = None ,
529
529
connector_state_manager : Optional [ConnectorStateManager ] = None ,
530
- source_config : Optional [ConnectionDefinition ] = None ,
530
+ max_concurrent_async_job_count : Optional [int ] = None ,
531
531
):
532
532
self ._init_mappings ()
533
533
self ._limit_pages_fetched_per_slice = limit_pages_fetched_per_slice
@@ -541,7 +541,7 @@ def __init__(
541
541
)
542
542
self ._connector_state_manager = connector_state_manager or ConnectorStateManager ()
543
543
self ._api_budget : Optional [Union [APIBudget , HttpAPIBudget ]] = None
544
- self ._job_tracker : JobTracker = self . _create_async_job_tracker ( source_config = source_config )
544
+ self ._job_tracker = JobTracker ( max_concurrent_async_job_count or 1 )
545
545
546
546
def _init_mappings (self ) -> None :
547
547
self .PYDANTIC_MODEL_TO_CONSTRUCTOR : Mapping [Type [BaseModel ], Callable [..., Any ]] = {
@@ -3219,13 +3219,3 @@ def set_api_budget(self, component_definition: ComponentDefinition, config: Conf
3219
3219
self ._api_budget = self .create_component (
3220
3220
model_type = HTTPAPIBudgetModel , component_definition = component_definition , config = config
3221
3221
)
3222
-
3223
- def _create_async_job_tracker (
3224
- self , source_config : Optional [ConnectionDefinition ]
3225
- ) -> JobTracker :
3226
- """
3227
- Sets up job tracking for async jobs based on limit specified in the source config.
3228
- """
3229
- if source_config :
3230
- return JobTracker (source_config .get ("max_concurrent_job_count" , 1 ))
3231
- return JobTracker (1 )
0 commit comments