mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 细化云端同步锁提升稳定性 Fix https://github.com/siyuan-note/siyuan/issues/5887
This commit is contained in:
parent
a942ae6a1b
commit
b53cb6c78b
4 changed files with 20 additions and 2 deletions
|
|
@ -34,6 +34,9 @@ import (
|
|||
)
|
||||
|
||||
func InsertLocalAssets(id string, assetPaths []string) (succMap map[string]interface{}, err error) {
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
|
||||
succMap = map[string]interface{}{}
|
||||
|
||||
bt := treenode.GetBlockTree(id)
|
||||
|
|
@ -101,6 +104,9 @@ func Upload(c *gin.Context) {
|
|||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(200, ret)
|
||||
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
|
||||
form, err := c.MultipartForm()
|
||||
if nil != err {
|
||||
logging.LogErrorf("insert asset failed: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue