Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #85 from mrajashree/readAndPull
Browse files Browse the repository at this point in the history
Separate git pull from readCatalog
  • Loading branch information
vincent99 authored Oct 21, 2016
2 parents a8a44b0 + 659f289 commit b0e5882
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions manager/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ func (cat *Catalog) readCatalog() error {
log.Infof("Catalog loaded without errors")
os.Exit(0)
}
err := cat.pullCatalog()
if err != nil {
log.Errorf("Git pull for Catalog %v failing with error: %v ", cat.CatalogID, err)
}
} else {
//remove the existing repo
err := os.RemoveAll(CatalogRootDir + cat.CatalogID)
Expand Down
4 changes: 4 additions & 0 deletions manager/catalog_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ func Init() {
catalog.readCatalog()
}

for _, catalog := range CatalogsCollection {
catalog.pullCatalog()
}

//start a background timer to pull from the Catalog periodically
startCatalogBackgroundPoll()
}
Expand Down

0 comments on commit b0e5882

Please sign in to comment.