Attempt to mitigate sqlite lockng issue

This commit is contained in:
R. Alex Matevish 2025-05-27 20:23:04 -07:00
parent 8ad5bb2eb7
commit 9e35088168
No known key found for this signature in database
GPG Key ID: 8717A977B24993D8

View File

@ -123,7 +123,9 @@ func markAsSent(filePath, hash string) {
func setupDatabase() error {
dbPath := filepath.Join(watchDir, "sent_files.db")
database, err := gorm.Open(sqlite.Open(dbPath), &gorm.Config{})
database, err := gorm.Open(sqlite.Open(dbPath), &gorm.Config{
SkipDefaultTransaction: true,
})
if err != nil {
return err
}