File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ impl StoreBuilder {
52
52
// attempt doesn't work for all of them because the database is
53
53
// unavailable, they will try again later in the normal course of
54
54
// using the pool
55
- join_all ( pools. iter ( ) . map ( |( _, pool) | async move { pool. setup ( ) } ) ) . await ;
55
+ join_all ( pools. iter ( ) . map ( |( _, pool) | pool. setup ( ) ) ) . await ;
56
56
57
57
let chains = HashMap :: from_iter ( config. chains . chains . iter ( ) . map ( |( name, chain) | {
58
58
let shard = ShardName :: new ( chain. shard . to_string ( ) )
Original file line number Diff line number Diff line change @@ -503,8 +503,14 @@ impl ConnectionPool {
503
503
/// # Panics
504
504
///
505
505
/// If any errors happen during the migration, the process panics
506
- pub fn setup ( & self ) {
507
- self . get_ready ( ) . ok ( ) ;
506
+ pub async fn setup ( & self ) {
507
+ let pool = self . clone ( ) ;
508
+ graph:: spawn_blocking_allow_panic ( move || {
509
+ pool. get_ready ( ) . ok ( ) ;
510
+ } )
511
+ . await
512
+ // propagate panics
513
+ . unwrap ( ) ;
508
514
}
509
515
510
516
pub ( crate ) async fn query_permit ( & self ) -> tokio:: sync:: OwnedSemaphorePermit {
You can’t perform that action at this time.
0 commit comments