SQLITE_BUSY prevention

This commit is contained in:
Justin Mazzocchi 2020-11-12 17:53:08 -08:00
parent 199e813754
commit 0b7b3d3dc4
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ extension DatabasePool {
do {
var configuration = Configuration()
configuration.busyMode = .timeout(5)
configuration.defaultTransactionKind = .immediate
configuration.prepareDatabase { db in
try db.usePassphrase(passphrase())
try db.execute(sql: "PRAGMA cipher_plaintext_header_size = 32")