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