Temporarily disable db close/open cycle (to be addressed later)

This commit is contained in:
Andrey Smirnov
2017-04-20 00:45:53 +03:00
parent 8078f3b588
commit c1d4c0fb88

View File

@@ -108,10 +108,10 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) error {
return fmt.Errorf("unable to update: %s", err)
}
err = context.CloseDatabase()
if err != nil {
return fmt.Errorf("unable to update: %s", err)
}
// err = context.CloseDatabase()
// if err != nil {
// return fmt.Errorf("unable to update: %s", err)
// }
// Catch ^C
sigch := make(chan os.Signal)
@@ -224,10 +224,10 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) error {
return fmt.Errorf("unable to update: download errors:\n %s", strings.Join(errors, "\n "))
}
err = context.ReOpenDatabase()
if err != nil {
return fmt.Errorf("unable to update: %s", err)
}
// err = context.ReOpenDatabase()
// if err != nil {
// return fmt.Errorf("unable to update: %s", err)
// }
repo.FinalizeDownload(context.CollectionFactory(), context.Progress())
err = context.CollectionFactory().RemoteRepoCollection().Update(repo)