Attempt to mitigate sqlite lockng issue
This commit is contained in:
parent
8ad5bb2eb7
commit
9e35088168
4
main.go
4
main.go
@ -123,7 +123,9 @@ func markAsSent(filePath, hash string) {
|
|||||||
|
|
||||||
func setupDatabase() error {
|
func setupDatabase() error {
|
||||||
dbPath := filepath.Join(watchDir, "sent_files.db")
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user