mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 WebDAV/S3 data sync and backup support configurable concurrent requests https://github.com/siyuan-note/siyuan/issues/12798
This commit is contained in:
parent
27618dd849
commit
488e87b70b
9 changed files with 75 additions and 18 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue