Fetch independent weather sources concurrently
This commit is contained in:
@@ -28,7 +28,10 @@ fetch before source requests begin.
|
||||
|
||||
The adapter makes one source request for each endpoint, subject to retry on
|
||||
transient failures. A successful readiness request supplies the current
|
||||
conditions source response.
|
||||
conditions source response. The remaining independent source requests run
|
||||
concurrently, then their results are processed in the source order shown below.
|
||||
This keeps source provenance, missing-source policy, and surfaced errors
|
||||
deterministic regardless of response order.
|
||||
|
||||
| Source | Endpoint | Query parameters | Availability |
|
||||
| --- | --- | --- | --- |
|
||||
|
||||
@@ -15,6 +15,11 @@ The adapter's successful readiness request for current conditions is reused as
|
||||
that normalized source; collection does not trigger a second identical current
|
||||
conditions request.
|
||||
|
||||
After readiness succeeds, the adapter obtains the other independent source
|
||||
responses concurrently. It merges their normalized results in the established
|
||||
source order, so provenance, warnings, and source-local failures remain
|
||||
deterministic. Cancellation remains authoritative for every in-flight request.
|
||||
|
||||
The package wraps adapter construction failures, including an invalid Weather
|
||||
API base URL, as weather-collection setup errors and fetch failures as
|
||||
bundle-collection errors. It does not retry, persist, select reports, derive
|
||||
|
||||
Reference in New Issue
Block a user