Use `ExistingPeriodicWorkPolicy.KEEP`.

* You almost never want replace, given `REPLACE` enqueues a
new instance of the WorkRequest again.
pull/69/head
Rahul Ravikumar 3 years ago
parent e470b8e69a
commit f69ce2cd1e

@ -46,7 +46,7 @@ class SyncInitializer : Initializer<Sync> {
// Run sync on app startup and ensure only one sync worker runs at any time // Run sync on app startup and ensure only one sync worker runs at any time
enqueueUniqueWork( enqueueUniqueWork(
SyncWorkName, SyncWorkName,
ExistingWorkPolicy.REPLACE, ExistingWorkPolicy.KEEP,
SyncWorker.startUpSyncWork() SyncWorker.startUpSyncWork()
) )
} }

Loading…
Cancel
Save