Fixed single stream update exception aborting all parallel updates.
CD / Build (push) Successful in 8s
CI / Formatting (push) Successful in 6s
CI / Linting (push) Successful in 6s
CI / Tests (push) Successful in 11s
CI / Type Checking (push) Successful in 10s
CI / Spelling (push) Successful in 5s
Audit / Dependencies (push) Failing after 9s

This commit is contained in:
2026-03-25 09:54:33 -04:00
parent c690702113
commit 47c7e97ac0
2 changed files with 67 additions and 3 deletions
+15 -3
View File
@@ -82,12 +82,24 @@ class StreamMonitor:
# Build a list of async tasks for each stream domain
# Run all stream updates in parallel and collect results
results = await asyncio.gather(
*(self.update_stream(domain) for domain in subscribed_domains)
*(self.update_stream(domain) for domain in subscribed_domains),
return_exceptions=True,
)
# Count successes and failures
successful_checks = results.count(True)
failed_checks = results.count(False)
successful_checks = 0
failed_checks = 0
for domain, result in zip(subscribed_domains, results, strict=True):
if isinstance(result, BaseException):
self.log.exception(
f"[{domain}] Unhandled exception during stream update.",
exc_info=result,
)
failed_checks += 1
elif result:
successful_checks += 1
else:
failed_checks += 1
self.log.debug(
f"Update complete. {successful_checks}/{total_streams} succeeded, "