🎨 WebDAV/S3 data sync and backup support configurable concurrent requests https://github.com/siyuan-note/siyuan/issues/12798

This commit is contained in:
Daniel 2024-10-16 19:29:11 +08:00
parent 27618dd849
commit 488e87b70b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
9 changed files with 75 additions and 18 deletions

View file

@ -179,6 +179,21 @@ func GetChildDocDepth(treeAbsPath string) (ret int) {
return
}
func NormalizeConcurrentReqs(concurrentReqs int, provider int) int {
if 1 > concurrentReqs {
if 2 == provider { // S3
return 8
} else if 3 == provider { // WebDAV
return 1
}
return 8
}
if 16 < concurrentReqs {
return 16
}
return concurrentReqs
}
func NormalizeTimeout(timeout int) int {
if 7 > timeout {
if 1 > timeout {