Revert "Added purge for 'ancient' out-of-date packages"

This reverts commit e911be6b6e.
This commit is contained in:
2022-08-12 23:19:18 +02:00
parent e911be6b6e
commit 9b28ceebb8

View File

@@ -5,7 +5,6 @@ import (
"context" "context"
"crypto/sha256" "crypto/sha256"
"encoding/hex" "encoding/hex"
"errors"
"fmt" "fmt"
"git.harting.dev/ALHP/ALHP.GO/ent" "git.harting.dev/ALHP/ALHP.GO/ent"
"git.harting.dev/ALHP/ALHP.GO/ent/dbpackage" "git.harting.dev/ALHP/ALHP.GO/ent/dbpackage"
@@ -121,10 +120,6 @@ func (p *ProtoPackage) isEligible(ctx context.Context) (bool, error) {
if local != nil { if local != nil {
log.Infof("Delayed %s: not all dependencies are up to date (local: %s==%s, sync: %s==%s)", p.Srcinfo.Pkgbase, local.Name(), local.Version(), local.Name(), syncVersion) log.Infof("Delayed %s: not all dependencies are up to date (local: %s==%s, sync: %s==%s)", p.Srcinfo.Pkgbase, local.Name(), local.Version(), local.Name(), syncVersion)
p.DbPackage.Update().SetSkipReason(fmt.Sprintf("waiting for %s==%s", local.Name(), syncVersion)).ExecX(ctx) p.DbPackage.Update().SetSkipReason(fmt.Sprintf("waiting for %s==%s", local.Name(), syncVersion)).ExecX(ctx)
if time.Since(p.DbPackage.BuildTimeStart).Hours() >= 48 {
return false, errors.New("package out of date for more than 48 hours")
}
} else { } else {
log.Infof("Delayed %s: not all dependencies are up to date or resolvable", p.Srcinfo.Pkgbase) log.Infof("Delayed %s: not all dependencies are up to date or resolvable", p.Srcinfo.Pkgbase)
p.DbPackage.Update().SetSkipReason("waiting for mirror").ExecX(ctx) p.DbPackage.Update().SetSkipReason("waiting for mirror").ExecX(ctx)