animedex.agg._fanout
Shared concurrent fan-out helper for aggregate commands.
Callers provide named source callables. The helper runs them
independently, catches per-source failures, and returns a structured
AggregateResult instead of
raising on the first failed backend.
FanoutSource
run_fanout
- animedex.agg._fanout.run_fanout(sources: Sequence[FanoutSource], *, max_workers: int | None = None) AggregateResult[source]
Run source calls and return one aggregate envelope.
- Parameters:
sources (sequence of FanoutSource) – Source call descriptors to run.
max_workers (int or None) – Optional thread-pool size.
Nonemeans one worker per source.
- Returns:
Aggregate result with successful rows and per-source statuses.
- Return type: