From 409a99569a4caa8c27ba791b36822ca4652322e9 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 17 Feb 2023 11:06:31 +0100 Subject: [PATCH] NSCv3: fix late BG processing --- .../nightscout/plugins/sync/nsclientV3/workers/LoadBgWorker.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/workers/LoadBgWorker.kt b/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/workers/LoadBgWorker.kt index e9106f9fd2..62aaedfedd 100644 --- a/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/workers/LoadBgWorker.kt +++ b/plugins/sync/src/main/java/info/nightscout/plugins/sync/nsclientV3/workers/LoadBgWorker.kt @@ -73,7 +73,6 @@ class LoadBgWorker( nsClientV3Plugin.storeLastLoadedSrvModified() } rxBus.send(EventNSClientNewLog("◄ RCV BG END", "No data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}")) - storeDataForDb.storeGlucoseValuesToDb() continueLoading = false } } else { @@ -83,7 +82,6 @@ class LoadBgWorker( nsClientV3Plugin.storeLastLoadedSrvModified() } rxBus.send(EventNSClientNewLog("◄ RCV BG END", "No new data from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}")) - storeDataForDb.storeGlucoseValuesToDb() continueLoading = false } } @@ -94,6 +92,7 @@ class LoadBgWorker( return Result.failure(workDataOf("Error" to error.localizedMessage)) } + storeDataForDb.storeGlucoseValuesToDb() nsClientV3Plugin.lastOperationError = null return Result.success() }