mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 15:00:27 +08:00
增加计算节点数函数
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user