NSCv3: fix late BG processing

This commit is contained in:
Milos Kozak 2023-02-17 11:06:31 +01:00
parent c128e5c824
commit 409a99569a

View file

@ -73,7 +73,6 @@ class LoadBgWorker(
nsClientV3Plugin.storeLastLoadedSrvModified() nsClientV3Plugin.storeLastLoadedSrvModified()
} }
rxBus.send(EventNSClientNewLog("◄ RCV BG END", "No data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}")) rxBus.send(EventNSClientNewLog("◄ RCV BG END", "No data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}"))
storeDataForDb.storeGlucoseValuesToDb()
continueLoading = false continueLoading = false
} }
} else { } else {
@ -83,7 +82,6 @@ class LoadBgWorker(
nsClientV3Plugin.storeLastLoadedSrvModified() nsClientV3Plugin.storeLastLoadedSrvModified()
} }
rxBus.send(EventNSClientNewLog("◄ RCV BG END", "No new data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}")) rxBus.send(EventNSClientNewLog("◄ RCV BG END", "No new data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}"))
storeDataForDb.storeGlucoseValuesToDb()
continueLoading = false continueLoading = false
} }
} }
@ -94,6 +92,7 @@ class LoadBgWorker(
return Result.failure(workDataOf("Error" to error.localizedMessage)) return Result.failure(workDataOf("Error" to error.localizedMessage))
} }
storeDataForDb.storeGlucoseValuesToDb()
nsClientV3Plugin.lastOperationError = null nsClientV3Plugin.lastOperationError = null
return Result.success() return Result.success()
} }