Compare commits

...

3 Commits

Author SHA1 Message Date
8782af6428 Fix status 2024-07-30 00:23:23 +01:00
eb79bc4fbc One at once 2024-07-30 00:21:06 +01:00
8827c02861 LTO by default 2024-07-30 00:07:21 +01:00
2 changed files with 16 additions and 6 deletions

View File

@ -56,9 +56,9 @@ func StartPackageQueueWorker(ctx context.Context) {
return true return true
}) })
if needsBuild { if needsBuild {
typ := domain.BuildTypeNormal typ := domain.BuildTypeLTO
if errPreviously { if errPreviously {
typ = domain.BuildTypeLTO typ = domain.BuildTypeNormal
} }
buildItem := domain.BuildQueueItem{ buildItem := domain.BuildQueueItem{
Source: v, Source: v,
@ -119,7 +119,7 @@ func processStatus(ctx context.Context) {
return true return true
} }
item.Source.Packages.Iter(func(k string, v domain.PackageInfo) bool { item.Source.Packages.Iter(func(k string, v domain.PackageInfo) bool {
v.Status = domain.Built v.Status = domain.Current
v.LastBuildStatus = domain.Built v.LastBuildStatus = domain.Built
v.Version = item.BuildVersion v.Version = item.BuildVersion
v.NewVersion = "" v.NewVersion = ""
@ -146,6 +146,19 @@ func processQueue(ctx context.Context) {
case <-ctx.Done(): case <-ctx.Done():
return return
default: default:
q := GetQueue()
buildingFound := false
q.ForEach(func(k string, item domain.BuildQueueItem) bool {
if item.Status == domain.Building {
buildingFound = true
return false
}
return true
})
if buildingFound {
time.Sleep(30 * time.Second)
continue
}
err := ProcessNext() err := ProcessNext()
if err != nil { if err != nil {
slog.Error("unable to process queue: " + err.Error()) slog.Error("unable to process queue: " + err.Error())

View File

@ -425,9 +425,6 @@ func GetPackagesCount() domain.PackagesCount {
case domain.Error: case domain.Error:
count.Error++ count.Error++
} }
if pkg.LastBuildStatus == domain.Error {
count.Error++
}
return false return false
}) })
return true return true