Skip to content
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
5 changes: 4 additions & 1 deletion ingestify/application/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ def run(self, selectors, dry_run: bool = False):
selector=selector,
)

with TaskExecutor(dry_run=dry_run) as task_executor:
with TaskExecutor(
dry_run=dry_run,
processes=ingestion_plan.source.max_concurrency,
) as task_executor:
for ingestion_job_summary in ingestion_job.execute(
self.store, task_executor=task_executor
):
Expand Down
4 changes: 4 additions & 0 deletions ingestify/domain/models/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@


class Source(ABC):
# Override in subclass to limit how many tasks run in parallel.
# None means use the default (system concurrency).
max_concurrency: Optional[int] = None

def __init__(self, name: str, **kwargs):
self.name = name

Expand Down
Loading