sunty
2020-04-13 ae710c2a5d10cb0c0556f6dc7814312185debb66
perfect asVolume
1个文件已修改
5 ■■■■■ 已修改文件
controllers/swfsControllers.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/swfsControllers.go
@@ -101,10 +101,7 @@
//请求作为主节点操作流程
func RequestMasterNodesOperation(nowPeers []interface{}) {
    //fmt.Println("config.Server.CoreBaseUnit", config.Server.CoreBaseUnit)
    coreBaseUnit, _ := strconv.Atoi(config.Server.CoreBaseUnit)
    //fmt.Println("nowPeers: ", nowPeers)
    //fmt.Println("coreBaseUnit: ", coreBaseUnit)
    UpdateAllNodesScriptArgument(nowPeers)
    RestartAllServer(nowPeers, coreBaseUnit)
}
@@ -174,7 +171,9 @@
//作为数据节点加入
func AsVolume() {
    UpdatePeers(config.Server.ScriptPath, StartServerScript, GetNewPeers(), GetNewPeers())
    ReplaceLineContentBySearch(StartScriptAsVolume, config.Server.ScriptPath, StartServerScript)
    ReplaceLineContentBySearch("peers=", config.Server.ScriptPath, StartServerScript)
    StartServer(config.Server.ScriptPath)
}