mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 00:59:07 -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)))
|
.max_lifetime(Some(Duration::from_secs(30)))
|
||||||
.build(manager)
|
.build(manager)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
// retrieve a connection to ensure the startup statements run immediately
|
||||||
|
{
|
||||||
|
let _ = pool.get();
|
||||||
|
}
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
"Built a connection pool {:?} (min={}, max={})",
|
"Built a connection pool {:?} (min={}, max={})",
|
||||||
name, min_size, max_size
|
name, min_size, max_size
|
||||||
|
|
Loading…
Reference in New Issue
Block a user