Browse Source

limit req count

pull/340/head
lewis 3 years ago
parent
commit
a471474c15
3 changed files with 3 additions and 0 deletions
  1. +1
    -0
      models/blockchain.go
  2. +1
    -0
      models/repo.go
  3. +1
    -0
      models/user.go

+ 1
- 0
models/blockchain.go View File

@@ -91,6 +91,7 @@ func GetBlockChainUnSuccessCommits() ([]*BlockChain, error) {
blockChains := make([]*BlockChain, 0, 10)
return blockChains, x.
Where("status != ?", BlockChainCommitSuccess).
Limit(100).
Find(&blockChains)
}



+ 1
- 0
models/repo.go View File

@@ -2421,6 +2421,7 @@ func GetBlockChainUnSuccessRepos() ([]*Repository, error) {
repos := make([]*Repository, 0, 10)
return repos, x.
Where("block_chain_status != ?", RepoBlockChainSuccess).
Limit(100).
Find(&repos)
}



+ 1
- 0
models/user.go View File

@@ -2047,6 +2047,7 @@ func GetBlockChainUnSuccessUsers() ([]*User, error) {
users := make([]*User, 0, 10)
err := x.Where("public_key = ''").
Or("private_key = ''").
Limit(100).
Find(&users)
return users, err
}

Loading…
Cancel
Save