diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.kt b/app/src/main/java/info/nightscout/androidaps/MainApp.kt index c3c7c58292..3f0134f640 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.kt +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.kt @@ -136,7 +136,7 @@ class MainApp : DaggerApplication() { ) WorkManager.getInstance(this).enqueueUniquePeriodicWork( KeepAliveWorker.KA_0, - ExistingPeriodicWorkPolicy.REPLACE, + ExistingPeriodicWorkPolicy.UPDATE, PeriodicWorkRequest.Builder(KeepAliveWorker::class.java, 15, TimeUnit.MINUTES) .setInputData(Data.Builder().putString("schedule", KeepAliveWorker.KA_0).build()) .setInitialDelay(5, TimeUnit.SECONDS) diff --git a/plugins/sync/src/main/java/info/nightscout/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt b/plugins/sync/src/main/java/info/nightscout/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt index be227e5b92..411b971bad 100644 --- a/plugins/sync/src/main/java/info/nightscout/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt +++ b/plugins/sync/src/main/java/info/nightscout/plugins/sync/openhumans/OpenHumansUploaderPlugin.kt @@ -563,7 +563,7 @@ class OpenHumansUploaderPlugin @Inject internal constructor( .setBackoffCriteria(BackoffPolicy.LINEAR, 20, TimeUnit.MINUTES) .setInitialDelay(if (delay) 1 else 0, TimeUnit.DAYS) .build() - WorkManager.getInstance(context).enqueueUniquePeriodicWork(WORK_NAME_PERIODIC, if (replace) ExistingPeriodicWorkPolicy.REPLACE else ExistingPeriodicWorkPolicy.KEEP, workRequest) + WorkManager.getInstance(context).enqueueUniquePeriodicWork(WORK_NAME_PERIODIC, if (replace) ExistingPeriodicWorkPolicy.UPDATE else ExistingPeriodicWorkPolicy.KEEP, workRequest) } internal fun uploadNow() {