added housekeeping check for failed but not removed packages

This commit is contained in:
Giovanni Harting 2023-09-04 18:26:17 +02:00
parent 6c93fc86a7
commit fd8bf63e3e
1 changed files with 8 additions and 0 deletions

View File

@ -186,6 +186,14 @@ func housekeeping(repo, march string, wg *sync.WaitGroup) error {
DBPackage: dbPkg,
}
buildManager.repoPurge[fullRepo] <- []*ProtoPackage{pkg}
case dbPkg.Status == dbpackage.StatusFailed && dbPkg.RepoVersion != "":
log.Infof("[HK] package %s->%s failed but still present in repo, removing", fullRepo, dbPkg.Pkgbase)
pkg := &ProtoPackage{
FullRepo: fullRepo,
March: march,
DBPackage: dbPkg,
}
buildManager.repoPurge[fullRepo] <- []*ProtoPackage{pkg}
}
}