db batch may not be a global resource

This way db usage is safe.
This commit is contained in:
Oliver Sauder authored and Lorenzo Bolla committed 2022-01-27 09:30:14 +01:00
1 parent f7f42a9cd8
commit 1c7c07ace7
5 files changed
+19 -82

No files matched your search

-3
View File
@@ -188,9 +188,6 @@ func aptlyDbCleanup(cmd *commander.Command, args []string) error {
err = toDelete.ForEach(func(ref []byte) error {
return collectionFactory.PackageCollection().DeleteByKey(ref, batch)
})
if err != nil {
return err
}
err = batch.Write()
if err != nil {