Skip to content

Commit

Permalink
Use work manager append or replace for observation and attachment sync
Browse files Browse the repository at this point in the history
  • Loading branch information
newmanw committed Apr 25, 2022
1 parent d186494 commit f2b8d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AttachmentPushService : Service(), IAttachmentEventListener {

fun beginWork(): UUID {
val request = workRequest()
WorkManager.getInstance().beginUniqueWork(ATTACHMENT_SYNC_WORK, ExistingWorkPolicy.APPEND, request).enqueue()
WorkManager.getInstance().beginUniqueWork(ATTACHMENT_SYNC_WORK, ExistingWorkPolicy.APPEND_OR_REPLACE, request).enqueue()
return request.id
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ObservationPushService : Service(), IObservationEventListener {

fun beginWork(): UUID {
val request = workRequest()
WorkManager.getInstance().beginUniqueWork(OBSERVATION_SYNC_WORK, ExistingWorkPolicy.APPEND, request).enqueue()
WorkManager.getInstance().beginUniqueWork(OBSERVATION_SYNC_WORK, ExistingWorkPolicy.APPEND_OR_REPLACE, request).enqueue()
return request.id
}
}
Expand Down

0 comments on commit f2b8d1b

Please sign in to comment.