Skip to content

Commit

Permalink
Merge branch 'master' into fix-populate-initial-values
Browse files Browse the repository at this point in the history
  • Loading branch information
parthfloyd authored Jan 29, 2025
2 parents 252f8d8 + b483ed0 commit 3c3846e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Releases.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 Google LLC
* Copyright 2023-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,7 +48,7 @@ object Releases {

object Engine : LibraryArtifact {
override val artifactId = "engine"
override val version = "1.1.0"
override val version = "1.2.0"
override val name = "Android FHIR Engine Library"
}

Expand Down
2 changes: 1 addition & 1 deletion docs/use/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API

* [Engine](api/engine/1.1.0/index.html)
* [Engine](api/engine/1.2.0/index.html)
* [Data Capture](api/data-capture/1.2.0/index.html)
* [Workflow](api/workflow/0.1.0-beta01/index.html)
* [Knowledge](api/knowledge/0.1.0-beta01/index.html)
8 changes: 5 additions & 3 deletions engine/src/main/java/com/google/android/fhir/sync/Sync.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 Google LLC
* Copyright 2023-2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,6 +67,7 @@ object Sync {
inline fun <reified W : FhirSyncWorker> oneTimeSync(
context: Context,
retryConfiguration: RetryConfiguration? = defaultRetryConfiguration,
existingWorkPolicy: ExistingWorkPolicy = ExistingWorkPolicy.KEEP,
): Flow<CurrentSyncJobStatus> {
val uniqueWorkName = "${W::class.java.name}-oneTimeSync"
val flow = getWorkerInfo(context, uniqueWorkName)
Expand All @@ -75,7 +76,7 @@ object Sync {
WorkManager.getInstance(context)
.enqueueUniqueWork(
uniqueWorkName,
ExistingWorkPolicy.KEEP,
existingWorkPolicy,
oneTimeWorkRequest,
)
return combineSyncStateForOneTimeSync(context, uniqueWorkName, flow)
Expand All @@ -95,6 +96,7 @@ object Sync {
inline fun <reified W : FhirSyncWorker> periodicSync(
context: Context,
periodicSyncConfiguration: PeriodicSyncConfiguration,
existingPeriodicWorkPolicy: ExistingPeriodicWorkPolicy = ExistingPeriodicWorkPolicy.KEEP,
): Flow<PeriodicSyncJobStatus> {
val uniqueWorkName = "${W::class.java.name}-periodicSync"
val flow = getWorkerInfo(context, uniqueWorkName)
Expand All @@ -103,7 +105,7 @@ object Sync {
WorkManager.getInstance(context)
.enqueueUniquePeriodicWork(
uniqueWorkName,
ExistingPeriodicWorkPolicy.KEEP,
existingPeriodicWorkPolicy,
periodicWorkRequest,
)
return combineSyncStateForPeriodicSync(context, uniqueWorkName, flow)
Expand Down

0 comments on commit 3c3846e

Please sign in to comment.