Coverage for src/qdrant_loader/config/concurrency.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.0, created at 2026-07-20 10:15 +0000

1from pydantic import Field 

2 

3from qdrant_loader.config.base import BaseConfig 

4 

5 

6class ConcurrencyConfig(BaseConfig): 

7 """Concurrency knobs for the document ingestion pipeline's stages.""" 

8 

9 max_chunk_workers: int = Field( 

10 default=10, 

11 gt=0, 

12 description="Maximum number of documents chunked concurrently", 

13 ) 

14 max_embed_workers: int = Field( 

15 default=4, 

16 gt=0, 

17 description="Maximum number of embedding batch requests in flight concurrently", 

18 ) 

19 max_upsert_workers: int = Field( 

20 default=4, 

21 gt=0, 

22 description="Maximum number of Qdrant upsert batch requests in flight concurrently", 

23 ) 

24 queue_size: int = Field( 

25 default=1000, 

26 gt=0, 

27 description="Advisory queue size hint passed to pipeline workers", 

28 ) 

29 upsert_batch_size: int | None = Field( 

30 default=None, 

31 gt=0, 

32 description=( 

33 "Number of chunks per Qdrant upsert batch. Defaults to the " 

34 "embedding batch size when unset." 

35 ), 

36 )