Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cf2fd8c452 | |||
| c415dceb22 |
@@ -77,6 +77,7 @@ class SyncEngine @Inject constructor(
|
||||
val accessor = makeAccessor(pair.localPath)
|
||||
var knownStates = fileStateDao.getForPair(pair.id).associateBy { it.relativePath }
|
||||
val remoteFiles = provider.listFiles(pair.remotePath).getOrThrow()
|
||||
.filter { !it.isDirectory } // skip remote directories — they are not sync targets
|
||||
.associateBy { it.path.removePrefix(pair.remotePath).trimStart('/') }
|
||||
val localFiles = accessor.walkFiles(pair)
|
||||
|
||||
@@ -93,7 +94,7 @@ class SyncEngine @Inject constructor(
|
||||
|
||||
val allPaths = (localFiles.keys + remoteFiles.keys + knownStates.keys).toSet()
|
||||
val hasPriorSyncState = knownStates.isNotEmpty()
|
||||
val semaphore = Semaphore(4)
|
||||
val semaphore = Semaphore(2) // limit concurrency to be gentle on the server
|
||||
val uploadedAtomic = AtomicInteger(0)
|
||||
val downloadedAtomic = AtomicInteger(0)
|
||||
val deletedAtomic = AtomicInteger(0)
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
VERSION_NAME=1.0.66
|
||||
VERSION_CODE=67
|
||||
VERSION_NAME=1.0.67
|
||||
VERSION_CODE=68
|
||||
|
||||
Reference in New Issue
Block a user