mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 00:59:07 -05:00
fix: in-memory SQLite DB correctly shares memory between connections
fixes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/73#event-227131
This commit is contained in:
parent
df411c24fb
commit
5f6ff4c2b7
|
@ -932,7 +932,7 @@ pub fn build_pool(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let manager = if settings.database.in_memory {
|
let manager = if settings.database.in_memory {
|
||||||
SqliteConnectionManager::memory()
|
SqliteConnectionManager::file("file::memory:?cache=shared")
|
||||||
.with_flags(flags)
|
.with_flags(flags)
|
||||||
.with_init(|c| c.execute_batch(STARTUP_SQL))
|
.with_init(|c| c.execute_batch(STARTUP_SQL))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user