forked from ALHP/ALHP.GO
only log if packages were requeued
This commit is contained in:
17
utils.go
17
utils.go
@@ -923,24 +923,31 @@ func logHK() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if rePortError.Match(logContent) || reSigError.Match(logContent) || reDownloadError.Match(logContent) {
|
if rePortError.Match(logContent) || reSigError.Match(logContent) || reDownloadError.Match(logContent) {
|
||||||
log.Infof("[HK/%s/%s] fixable build-error detected, requeueing package", pkg.March, pkg.Pkgbase)
|
rows, err := db.DbPackage.Update().Where(dbpackage.And(dbpackage.Pkgbase(pkg.Pkgbase), dbpackage.March(pkg.March),
|
||||||
err = db.DbPackage.Update().Where(dbpackage.And(dbpackage.Pkgbase(pkg.Pkgbase), dbpackage.March(pkg.March),
|
dbpackage.StatusEQ(dbpackage.StatusFailed))).ClearHash().SetStatus(dbpackage.StatusQueued).Save(context.Background())
|
||||||
dbpackage.StatusEQ(dbpackage.StatusFailed))).ClearHash().SetStatus(dbpackage.StatusQueued).Exec(context.Background())
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rows > 0 {
|
||||||
|
log.Infof("[HK/%s/%s] fixable build-error detected, requeueing package (%d)", pkg.March, pkg.Pkgbase, rows)
|
||||||
|
}
|
||||||
} else if reLdError.Match(logContent) {
|
} else if reLdError.Match(logContent) {
|
||||||
log.Infof("[HK/%s/%s] fixable build-error detected (linker-error), requeueing package", pkg.March, pkg.Pkgbase)
|
log.Infof("[HK/%s/%s] fixable build-error detected (linker-error), requeueing package", pkg.March, pkg.Pkgbase)
|
||||||
err = db.DbPackage.Update().Where(
|
rows, err := db.DbPackage.Update().Where(
|
||||||
dbpackage.And(
|
dbpackage.And(
|
||||||
dbpackage.Pkgbase(pkg.Pkgbase),
|
dbpackage.Pkgbase(pkg.Pkgbase),
|
||||||
dbpackage.March(pkg.March),
|
dbpackage.March(pkg.March),
|
||||||
dbpackage.StatusEQ(dbpackage.StatusFailed),
|
dbpackage.StatusEQ(dbpackage.StatusFailed),
|
||||||
dbpackage.LtoNotIn(dbpackage.LtoAutoDisabled, dbpackage.LtoDisabled),
|
dbpackage.LtoNotIn(dbpackage.LtoAutoDisabled, dbpackage.LtoDisabled),
|
||||||
)).ClearHash().SetStatus(dbpackage.StatusQueued).SetLto(dbpackage.LtoAutoDisabled).Exec(context.Background())
|
)).ClearHash().SetStatus(dbpackage.StatusQueued).SetLto(dbpackage.LtoAutoDisabled).Save(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rows > 0 {
|
||||||
|
log.Infof("[HK/%s/%s] fixable build-error detected (linker-error), requeueing package (%d)", pkg.March, pkg.Pkgbase, rows)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user