mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 10:11:23 +02:00
Doesn’t need to check for SQLite again the the Progres list
This commit is contained in:
parent
0699138c47
commit
488ce878b3
@ -61,11 +61,7 @@ func toList(listof []*model.RepoLite) (string, []interface{}) {
|
|||||||
// to a sql IN statement compatible with postgres.
|
// to a sql IN statement compatible with postgres.
|
||||||
func toListPostgres(listof []*model.RepoLite) (string, []interface{}) {
|
func toListPostgres(listof []*model.RepoLite) (string, []interface{}) {
|
||||||
var size = len(listof)
|
var size = len(listof)
|
||||||
switch {
|
if size > 15000 {
|
||||||
case meddler.Default == meddler.SQLite && size > 999:
|
|
||||||
size = 999
|
|
||||||
listof = listof[:999]
|
|
||||||
case size > 15000:
|
|
||||||
size = 15000
|
size = 15000
|
||||||
listof = listof[:15000]
|
listof = listof[:15000]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user