mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 06:40:50 +00:00
fix(sync): answer with what a run wrote, not that it completed
Six provider syncs returned a bare count, which narrowed their failures away: a Nightscout window in which every SGV row was refused by a constraint returned the same 0 as a quiet night, and an Oura or Polar run whose collections all failed returned 0 too. The routes then answered 200 with a count and the settings card drew a green tick over it. Every sync now reports what it imported AND whether any part of it did not land, and the route resolves the outcome server-side so the web card and the native client cannot disagree. Google Health keeps its 502 for a run that failed and wrote nothing, but a run that failed after writing some resources is now a partial rather than a discarded result. The labs OCR commit carries the same resolved outcome.
This commit is contained in:
1 parent
52288b7f77
commit
530f78dcf5
29 files changed
+310
-112
No files matched your search
+12
-1
@@ -29688,11 +29688,22 @@ components:
|
||||
- analyte
|
||||
- reason
|
||||
additionalProperties: false
|
||||
outcome:
|
||||
type: string
|
||||
enum:
|
||||
- empty
|
||||
- failed
|
||||
- partial
|
||||
- success
|
||||
description: How the commit reads, resolved from the counts rather than the status code. `success` only when every
|
||||
confirmed row was written; `partial` when some were skipped; `failed` when nothing was written and at least
|
||||
one row was skipped; `empty` when there was nothing to write.
|
||||
required:
|
||||
- inserted
|
||||
- skipped
|
||||
- outcome
|
||||
additionalProperties: false
|
||||
description: 'The rows written (`source: "OCR"`) and those skipped as commit-time duplicates.'
|
||||
description: 'The rows written (`source: "OCR"`), those skipped as commit-time duplicates, and the resolved outcome.'
|
||||
OcrCommittedLabResult:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in new issue
Block a user