fix: ensure startup SQL runs, even with zero min writers
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user