Generating contents indexes via temporary LevelDB

This commit is contained in:
Andrey Smirnov
2017-02-21 19:09:51 +03:00
parent f58d2627c1
commit f2dc4eeec9
3 changed files with 107 additions and 32 deletions
+8 -1
View File
@@ -469,6 +469,13 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
return err
}
tempDB, err := collectionFactory.TemporaryDB()
if err != nil {
return err
}
defer tempDB.Close()
defer tempDB.Drop()
if progress != nil {
progress.Printf("Loading packages...\n")
}
@@ -563,7 +570,7 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
contentIndex := contentIndexes[key]
if contentIndex == nil {
contentIndex = NewContentsIndex()
contentIndex = NewContentsIndex(tempDB)
contentIndexes[key] = contentIndex
}