集群增加是否远程启动选项

This commit is contained in:
刘祥超
2022-09-17 15:11:34 +08:00
parent 5f822062da
commit 55eecce416
7 changed files with 77 additions and 53 deletions

View File

@@ -197,7 +197,7 @@ func (this *NodeClusterDAO) CreateCluster(tx *dbs.Tx, adminId int64, name string
}
// UpdateCluster 修改集群
func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, grantId int64, installDir string, timezone string, nodeMaxThreads int32, autoOpenPorts bool, clockConfig *nodeconfigs.ClockConfig) error {
func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name string, grantId int64, installDir string, timezone string, nodeMaxThreads int32, autoOpenPorts bool, clockConfig *nodeconfigs.ClockConfig, autoRemoteStart bool) error {
if clusterId <= 0 {
return errors.New("invalid clusterId")
}
@@ -222,6 +222,8 @@ func (this *NodeClusterDAO) UpdateCluster(tx *dbs.Tx, clusterId int64, name stri
op.Clock = clockJSON
}
op.AutoRemoteStart = autoRemoteStart
err := this.Save(tx, op)
if err != nil {
return err