added batch limit to not clog up build-queue
This commit is contained in:
@@ -63,6 +63,7 @@ build:
|
||||
worker: 2
|
||||
makej: 8
|
||||
checks: true
|
||||
batch: 100
|
||||
|
||||
logging:
|
||||
level: INFO
|
5
main.go
5
main.go
@@ -620,10 +620,14 @@ func (b *BuildManager) syncWorker() {
|
||||
pkgBuilds, err := Glob(filepath.Join(conf.Basedir.Upstream, "/**/PKGBUILD"))
|
||||
check(err)
|
||||
|
||||
queued := 0
|
||||
for _, pkgbuild := range pkgBuilds {
|
||||
if b.exit {
|
||||
return
|
||||
}
|
||||
if queued >= conf.Build.Batch {
|
||||
break
|
||||
}
|
||||
|
||||
sPkgbuild := strings.Split(pkgbuild, "/")
|
||||
repo := sPkgbuild[len(sPkgbuild)-2]
|
||||
@@ -657,6 +661,7 @@ func (b *BuildManager) syncWorker() {
|
||||
continue
|
||||
}
|
||||
|
||||
queued++
|
||||
// send to parse
|
||||
for _, march := range conf.March {
|
||||
b.parseWG.Add(1)
|
||||
|
Reference in New Issue
Block a user