Fix error state resetting
This commit is contained in:
parent
e3593d4321
commit
a29d7396ef
@ -43,9 +43,25 @@ func ProcessPackages() error {
|
||||
ProcessStalePackages(internalPackages, externalPackages)
|
||||
ProcessMissingPackages(internalPackages, externalPackages)
|
||||
|
||||
currentPackagesFastMap.Clear()
|
||||
internalPackages.ForEach(func(k string, v domain.SourcePackage) bool {
|
||||
currentPackagesFastMap.Set(k, v)
|
||||
curr, ok := currentPackagesFastMap.Get(k)
|
||||
if !ok {
|
||||
currentPackagesFastMap.Set(k, v)
|
||||
return true
|
||||
}
|
||||
curr.Packages.ForEach(func(kk string, pk domain.PackageInfo) bool {
|
||||
v.Packages.ForEach(func(vv string, pv domain.PackageInfo) bool {
|
||||
if pv.PackageName == pk.PackageName {
|
||||
if pk.Status == domain.Error {
|
||||
pv.LastBuildStatus = domain.Error
|
||||
}
|
||||
curr.Packages.Set(vv, pv)
|
||||
}
|
||||
return true
|
||||
})
|
||||
return true
|
||||
})
|
||||
currentPackagesFastMap.Set(k, curr)
|
||||
return true
|
||||
})
|
||||
|
||||
@ -271,7 +287,9 @@ func ProcessStalePackages(internalPackages *haxmap.Map[string, domain.SourcePack
|
||||
extVer, _ := version.Parse(newVersion)
|
||||
cmpVal := version.Compare(mVer, extVer)
|
||||
if cmpVal < 0 {
|
||||
currentPackage.Status = domain.Stale
|
||||
if currentPackage.Status != domain.Error {
|
||||
currentPackage.Status = domain.Stale
|
||||
}
|
||||
currentPackage.NewVersion = extVer.String()
|
||||
matchedPackage.Packages.Set(currentKey, currentPackage)
|
||||
}
|
||||
@ -299,6 +317,9 @@ func ProcessStalePackages(internalPackages *haxmap.Map[string, domain.SourcePack
|
||||
})
|
||||
if wasMissing {
|
||||
matchedPackage.Packages.ForEach(func(k string, v domain.PackageInfo) bool {
|
||||
if v.Status == domain.Error {
|
||||
return true
|
||||
}
|
||||
if v.Status == domain.Missing {
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user