实现删除集群

This commit is contained in:
刘祥超
2020-10-25 16:22:44 +08:00
parent 3a2d864b80
commit 022aa174a4
3 changed files with 25 additions and 2 deletions

View File

@@ -729,6 +729,14 @@ func (this *ServerDAO) FindAllEnabledServersWithWebIds(webIds []int64) (result [
return
}
// 计算使用某个集群的所有服务数量
func (this *ServerDAO) CountAllEnabledServersWithNodeClusterId(clusterId int64) (int64, error) {
return this.Query().
State(ServerStateEnabled).
Attr("clusterId", clusterId).
Count()
}
// 创建事件
func (this *ServerDAO) createEvent() error {
return SharedSysEventDAO.CreateEvent(NewServerChangeEvent())