增加计算节点数函数

This commit is contained in:
GoEdgeLab
2023-03-05 16:48:49 +08:00
parent f17d007040
commit 8732557d4b

View File

@@ -7,6 +7,13 @@ import (
"github.com/iwind/TeaGo/dbs"
)
func (this *NodeDAO) CountAllAuthorityNodes(tx *dbs.Tx) (int64, error) {
return this.Query(tx).
State(NodeStateEnabled).
Where("clusterId IN (SELECT id FROM " + SharedNodeClusterDAO.Table + " WHERE state=1)").
Count()
}
func (this *NodeDAO) CheckNodesLimit(tx *dbs.Tx) error {
return nil
}