Skip to content

Commit

Permalink
Add debug to figure out timing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill committed Nov 7, 2023
1 parent 2d37d7b commit a5978cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/external-repos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func main() {
}
if config.Get().Features.Snapshots.Enabled {
waitForPulp()
debugIssue()
err := enqueueSyncRepos(&urls)
if err != nil {
log.Warn().Msgf("Error enqueuing snapshot tasks: %v", err)
Expand Down Expand Up @@ -194,6 +195,17 @@ func enqueueIntrospectAllRepos() error {
return nil
}

func debugIssue() {
repoConfigDao := dao.GetRepositoryConfigDao(db.DB)
repoConfigs, err := repoConfigDao.InternalOnly_ListReposToSnapshot(nil)
if err != nil {
log.Error().Err(err).Msg("error getting repository configurations")
}
for _, repoConfig := range repoConfigs {
log.Warn().Msgf("Repository: %v", repoConfig.Name)
}
}

func enqueueSyncRepos(urls *[]string) error {
q, err := queue.NewPgQueue(db.GetUrl())
if err != nil {
Expand Down

0 comments on commit a5978cc

Please sign in to comment.