Skip to content

Commit 26d57ee

Browse files
committed
clean
1 parent 5c63a14 commit 26d57ee

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

airbyte_cdk/sources/declarative/async_job/job_tracker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ class ConcurrentJobLimitReached(Exception):
1515

1616

1717
class JobTracker:
18-
def __init__(self, limit: Optional[int]):
18+
def __init__(self, limit: int):
1919
self._jobs: Set[str] = set()
20-
self._limit = limit if isinstance(limit, int) and limit >= 1 else 1
20+
self._limit = 1 if limit < 1 else limit
2121
self._lock = threading.Lock()
2222

2323
def try_to_get_intent(self) -> str:

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,6 @@ definitions:
24192419
title: Maximum Concurrent Job Count
24202420
description: Maximum number of concurrent jobs to run. This is often set by the API's maximum number of concurrent jobs on the account level.
24212421
type: integer
2422-
default: 1
24232422
MinMaxDatetime:
24242423
title: Min-Max Datetime
24252424
description: Compares the provided date against optional minimum or maximum times. The max_datetime serves as the ceiling and will be returned when datetime exceeds it. The min_datetime serves as the floor.

airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def __init__(
541541
)
542542
self._connector_state_manager = connector_state_manager or ConnectorStateManager()
543543
self._api_budget: Optional[Union[APIBudget, HttpAPIBudget]] = None
544-
self._job_tracker: Optional[JobTracker] = self._set_max_concurrent_async_job_count(
544+
self._job_tracker: Optional[JobTracker] = self._create_async_job_tracker(
545545
source_config=source_config
546546
)
547547

@@ -3225,7 +3225,7 @@ def set_api_budget(self, component_definition: ComponentDefinition, config: Conf
32253225
model_type=HTTPAPIBudgetModel, component_definition=component_definition, config=config
32263226
)
32273227

3228-
def _set_max_concurrent_async_job_count(
3228+
def _create_async_job_tracker(
32293229
self, source_config: ConnectionDefinition
32303230
) -> Optional[JobTracker]:
32313231
"""

0 commit comments

Comments
 (0)