Fix flakey test failures by removing cache=shared which is a discouraged mode (https://www.sqlite.org/sharedcache.html). WAL is sufficient for our purposes. Plus fix a bug where the TUI would go into an infinite loop if there were zero results.

This commit is contained in:
David Dworken
2022-11-15 23:20:19 -08:00
parent e05300c732
commit 49a1035169
7 changed files with 99 additions and 29 deletions

View File

@@ -409,6 +409,7 @@ func AddToDbIfNew(db *gorm.DB, entry data.HistoryEntry) {
tx.Limit(1).Find(&results)
if len(results) == 0 {
db.Create(entry)
// TODO: check the error here and bubble it up
}
}