mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 23:57:42 +01:00
Merge pull request #860 from ScorpioCPH/minor-fix-log-print
minor fix log print
This commit is contained in:
commit
e9a3bb989c
@ -288,20 +288,22 @@ func SyncRegistry() error {
|
||||
repoRecord := models.RepoRecord{Name: repoToAdd, OwnerName: user, ProjectName: project, PullCount: pullCount}
|
||||
if err := dao.AddRepository(repoRecord); err != nil {
|
||||
log.Errorf("Error happens when adding the missing repository: %v", err)
|
||||
}
|
||||
} else {
|
||||
log.Debugf("Add repository: %s success.", repoToAdd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(reposToDel) > 0 {
|
||||
log.Debugf("Start deleting repositories from DB... ")
|
||||
for _, repoToDel := range reposToDel {
|
||||
if err := dao.DeleteRepository(repoToDel); err != nil {
|
||||
log.Errorf("Error happens when deleting the repository: %v", err)
|
||||
}
|
||||
} else {
|
||||
log.Debugf("Delete repository: %s success.", repoToDel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
log.Debugf("Sync repositories from registry to DB is done.")
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user