Refactor functions that created their own sessions when called from within existing transactions, which caused "database table is locked" errors in SQLite's shared-cache mode. Changes: - Add files.CreateWithSession() to reuse caller's session - Refactor DeleteBackgroundFileIfExists() to accept session parameter - Add variadic session parameter to notifications.Notify() and Notifiable.ShouldNotify() interface - Update all Notify callers (~17 sites) to pass their session through - Use files.CreateWithSession in SaveBackgroundFile and NewAttachment - Fix test code to commit sessions before assertions |
||
|---|---|---|
| .. | ||
| db.go | ||
| diagnostics_unix.go | ||
| diagnostics_windows.go | ||
| dump.go | ||
| error.go | ||
| filehandling.go | ||
| files.go | ||
| files_test.go | ||
| main_test.go | ||
| repair.go | ||
| s3_test.go | ||