mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
Merge branch 'fix/v1436-gh' into release/v1.43.6
This commit is contained in:
commit
9d6bfe2624
30 files changed
+1705
-129
No files matched your search
@@ -77860,6 +77860,34 @@ components:
|
||||
anyOf:
|
||||
- $ref: "#/components/schemas/ConnectionHealth"
|
||||
- type: "null"
|
||||
backfillEnded:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The measurement type whose imported history ends here (e.g. `PULSE` for heart rate).
|
||||
endsAt:
|
||||
type: string
|
||||
format: date-time
|
||||
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
|
||||
description: The oldest instant the imported history of this type reaches back to.
|
||||
reason:
|
||||
type: string
|
||||
enum:
|
||||
- horizon
|
||||
- no_progress
|
||||
description: "`horizon`: the backfill reads back a set number of years (`GOOGLE_HEALTH_BACKFILL_HORIZON_YEARS`, twenty
|
||||
by default) and the history goes further. `no_progress`: Google kept returning pages that reached no
|
||||
further back, so the import stopped there."
|
||||
required:
|
||||
- type
|
||||
- endsAt
|
||||
- reason
|
||||
additionalProperties: false
|
||||
description: Data types whose history backfill ended before the beginning of their history, with where and why. Empty
|
||||
when every type was read to its start. Kept after the backfill completes; cleared on reconnect.
|
||||
needsReauth:
|
||||
deprecated: true
|
||||
description: "Deprecated: removed in v1.44, read `health`. The stored refresh token was rejected with `invalid_grant` —
|
||||
@@ -78582,6 +78610,34 @@ components:
|
||||
type:
|
||||
- boolean
|
||||
- "null"
|
||||
backfillEnded:
|
||||
description: Google Health only. Data types whose history backfill ended before the beginning of their history, with
|
||||
where and why.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The measurement type whose imported history ends here (e.g. `PULSE` for heart rate).
|
||||
endsAt:
|
||||
type: string
|
||||
format: date-time
|
||||
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
|
||||
description: The oldest instant the imported history of this type reaches back to.
|
||||
reason:
|
||||
type: string
|
||||
enum:
|
||||
- horizon
|
||||
- no_progress
|
||||
description: "`horizon`: the backfill reads back a set number of years (`GOOGLE_HEALTH_BACKFILL_HORIZON_YEARS`, twenty
|
||||
by default) and the history goes further. `no_progress`: Google kept returning pages that reached no
|
||||
further back, so the import stopped there."
|
||||
required:
|
||||
- type
|
||||
- endsAt
|
||||
- reason
|
||||
additionalProperties: false
|
||||
scope:
|
||||
description: Withings only.
|
||||
type:
|
||||
|
||||
@@ -126,8 +126,11 @@ Only one sync runs per account at a time. **Sync now** reports that a sync is
|
||||
already in progress while the history backfill that follows a connect is
|
||||
running, and shows its progress instead of starting a second one.
|
||||
|
||||
The backfill reads the account's whole history, and for a watch that records
|
||||
heart rate every minute that is a thousand-odd pages per year. It runs in
|
||||
The backfill reads the account's whole history. Heart rate is by far the
|
||||
largest part: a page holds up to 1,000 readings, so a watch that records once
|
||||
a minute fills some 525 pages a year, and one that records every few seconds
|
||||
(as many Pixel and Fitbit watches do during the day) several thousand; one
|
||||
account measured about 4,100 pages a year. It runs in
|
||||
slices: a slice reads for up to five minutes or 500 pages, writes what it
|
||||
read, notes how far it got and lets go of the account. The next slice starts
|
||||
a minute later where the last one stopped. Two kinds of note are kept: a data
|
||||
@@ -171,6 +174,35 @@ three times before they count as a failure. None of these mark the connection
|
||||
as needing a reconnect. Access tokens last an hour, and a long backfill renews
|
||||
its token as it goes.
|
||||
|
||||
### How far back the backfill reads
|
||||
|
||||
The backfill is not bounded by a number of pages, because how many pages a
|
||||
year of history fills depends on the device. Two bounds apply instead:
|
||||
|
||||
- **The horizon.** It reads back at most 20 years. Set
|
||||
`GOOGLE_HEALTH_BACKFILL_HORIZON_YEARS` to a whole number from 1 to 100 to
|
||||
change that (it is on the compose `environment:` list; any other value
|
||||
falls back to 20). A data type whose history goes back further is imported
|
||||
up to the horizon and ends there.
|
||||
- **Progress.** A walk has to reach older readings as it goes. If Google
|
||||
hands out 20 pages in a row that reach no further back than the ones before
|
||||
them (the same page again, or a page token that goes round in a circle),
|
||||
the walk stops, and that data type's history ends at the oldest reading
|
||||
written so far. Retrying would only meet the same wall, so it is not
|
||||
retried; a reconnect starts the backfill over.
|
||||
|
||||
Either way the data type counts as finished, the backfill completes once
|
||||
every other type is in, and the integration card stops saying that older
|
||||
history is loading. Instead it says, per data type, how far back the import
|
||||
reaches and why it ends there.
|
||||
|
||||
Before 1.43.6 every page-by-page data type had a ceiling of pages counted
|
||||
across all slices (10,000 for heart rate, 1,000 for the others). A dense
|
||||
heart-rate history reaches 10,000 pages two to three years back, the count
|
||||
never reset, and from then on every slice stopped at the same place without
|
||||
the backfill ever completing. A backfill left in that state continues from
|
||||
where it stopped with the first slice after the update.
|
||||
|
||||
A slice that moved nothing forward (no data type finished, no reading older
|
||||
than before) is a real failure: the job fails with the reason, pg-boss retries
|
||||
it a few times, and after that the next restart offers the backfill again.
|
||||
@@ -215,6 +247,13 @@ reading:
|
||||
`edgeFrom` and `edgeTo`, the oldest reading written before and after the
|
||||
slice.
|
||||
- `edges`: where every unfinished page-by-page data type stands now.
|
||||
- `ended`: data types whose history ended short of its beginning, each
|
||||
with its measurement `type`, the instant it ends at (`at`) and the
|
||||
`reason` (`horizon` or `no_progress`).
|
||||
- `meta["googleHealth.backfill.ended"]` appears on the slice where a data
|
||||
type ended short, with the same entries. A walk stopped for lack of
|
||||
progress also leaves a warning:
|
||||
`fetchHeartRate: 20 pages in a row reached no further back than <instant>`.
|
||||
- `meta["googleHealth.backfill.edgeFilterUnsupported"]` appears on the slice
|
||||
where Google refused the upper-bound filter, listing the data types noted
|
||||
as refusing it.
|
||||
|
||||
Reference in new issue
Block a user