Skip to content

Commit

Permalink
Merge pull request #707 from apachelogger/batch-contents
Browse files Browse the repository at this point in the history
batch updates to the temporary db when publishing
  • Loading branch information
smira committed Feb 27, 2018
2 parents d0101be + 9125745 commit 581876d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deb/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,13 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorageP
}
}

// Start a db batch. If we fill contents data we'll need
// to push each path of the package into the database.
// We'll want this batched so as to avoid an excessive
// amount of write() calls.
tempDB.StartBatch()
defer tempDB.FinishBatch()

for _, arch := range p.Architectures {
if pkg.MatchesArchitecture(arch) {
var bufWriter *bufio.Writer
Expand Down

0 comments on commit 581876d

Please sign in to comment.