forked from ALHP/ALHP.GO
avoid nil reference
This commit is contained in:
10
main.go
10
main.go
@@ -279,12 +279,16 @@ func (b *BuildManager) parseWorker() {
|
|||||||
if !isLatest {
|
if !isLatest {
|
||||||
if local != nil {
|
if local != nil {
|
||||||
log.Infof("Delayed %s: not all dependencies are up to date (local: %s==%s, sync: %s==%s)", info.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)", info.Pkgbase, local.Name(), local.Version(), local.Name(), syncVersion)
|
||||||
|
dbLock.Lock()
|
||||||
|
dbPkg = dbPkg.Update().SetSkipReason(fmt.Sprintf("waiting for %s==%s", local.Name(), syncVersion)).SaveX(context.Background())
|
||||||
|
dbLock.Unlock()
|
||||||
} else {
|
} else {
|
||||||
log.Infof("Delayed %s: not all dependencies are up to date", info.Pkgbase)
|
log.Infof("Delayed %s: not all dependencies are up to date", info.Pkgbase)
|
||||||
|
dbLock.Lock()
|
||||||
|
dbPkg = dbPkg.Update().SetSkipReason("waiting for mirror").SaveX(context.Background())
|
||||||
|
dbLock.Unlock()
|
||||||
}
|
}
|
||||||
dbLock.Lock()
|
|
||||||
dbPkg = dbPkg.Update().SetSkipReason(fmt.Sprintf("waiting for %s==%s", local.Name(), syncVersion)).SaveX(context.Background())
|
|
||||||
dbLock.Unlock()
|
|
||||||
b.parseWG.Done()
|
b.parseWG.Done()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user