Skip to content

Commit

Permalink
run cutom sync once the last fhir sync job completes.
Browse files Browse the repository at this point in the history
Signed-off-by: Lentumunai-Mark <[email protected]>
  • Loading branch information
Lentumunai-Mark committed Dec 16, 2024
1 parent 5ac004b commit 98dad18
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ constructor(
onSyncListener.onSync(syncStatus)

Check warning on line 120 in android/engine/src/main/java/org/smartregister/fhircore/engine/sync/SyncBroadcaster.kt

View check run for this annotation

Codecov / codecov/patch

android/engine/src/main/java/org/smartregister/fhircore/engine/sync/SyncBroadcaster.kt#L120

Added line #L120 was not covered by tests
}

if (
status.currentSyncJobStatus is CurrentSyncJobStatus.Succeeded ||
status.lastSyncJobStatus is LastSyncJobStatus.Succeeded
) {
if (status.lastSyncJobStatus is LastSyncJobStatus.Succeeded) {
Timber.d("Periodic sync succeeded. Triggering CustomSyncWorker...")
workManager.enqueue(
OneTimeWorkRequestBuilder<CustomSyncWorker>()
Expand Down

0 comments on commit 98dad18

Please sign in to comment.