mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-25 01:59:08 -05:00
fix: ensure startup SQL runs, even with zero min writers
This commit is contained in:
parent
4647476622
commit
087b68128f
|
@ -1203,6 +1203,11 @@ pub fn build_pool(
|
|||
.max_lifetime(Some(Duration::from_secs(30)))
|
||||
.build(manager)
|
||||
.unwrap();
|
||||
// retrieve a connection to ensure the startup statements run immediately
|
||||
{
|
||||
let _ = pool.get();
|
||||
}
|
||||
|
||||
info!(
|
||||
"Built a connection pool {:?} (min={}, max={})",
|
||||
name, min_size, max_size
|
||||
|
|
Loading…
Reference in New Issue
Block a user