mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-19 10:47:13 +00:00
mirror: increase logging for easier debugging
This commit is contained in:
1 parent
2b7bb24c92
commit
19f7b0fe8d
2 files changed
+25
-7
No files matched your search
@@ -99,13 +99,13 @@ func apiDbCleanup(c *gin.Context) {
|
||||
db, _ := context.Database()
|
||||
|
||||
if toDelete.Len() > 0 {
|
||||
batch := db.StartBatch()
|
||||
batch := db.CreateBatch()
|
||||
toDelete.ForEach(func(ref []byte) error {
|
||||
collectionFactory.PackageCollection().DeleteByKey(ref, batch)
|
||||
return nil
|
||||
})
|
||||
|
||||
err = db.FinishBatch(batch)
|
||||
err = batch.Write()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to write to DB: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user