Skip to content

perf: Use asyncio.gather for concurrent API fetches in briefing and tonight#7

Open
Orinks wants to merge 1 commit intomainfrom
perf/concurrent-api-fetches
Open

perf: Use asyncio.gather for concurrent API fetches in briefing and tonight#7
Orinks wants to merge 1 commit intomainfrom
perf/concurrent-api-fetches

Conversation

@Orinks
Copy link
Owner

@Orinks Orinks commented Feb 14, 2026

Closes #6

Replaces sequential API calls with asyncio.gather(return_exceptions=True) in both DailyBriefing.get_briefing() and TonightSummary.get_summary().

All 7 (briefing) and 6 (tonight) independent data sources now fetch concurrently, reducing total latency from the sum of all calls to the duration of the slowest one.

Error handling preserved: each failed source is logged and skipped, same as before.

Tests: All 307 existing tests pass.

…onight

Replaces sequential API calls with asyncio.gather(return_exceptions=True)
in both DailyBriefing.get_briefing() and TonightSummary.get_summary().

All 7 (briefing) and 6 (tonight) independent data sources now fetch
concurrently, reducing total latency from the sum of all calls to the
duration of the slowest one.

Error handling preserved: each failed source is logged and skipped,
same as before.

Closes #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: Use asyncio.gather for concurrent API fetches in briefing and tonight modules

1 participant