mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 WebDAV/S3 data sync and backup support configurable concurrent requests https://github.com/siyuan-note/siyuan/issues/12798
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user