@@ -350,7 +350,7 @@ impl SubgraphStore {
350350 // In that case, we need to use the shard and node
351351 // assignment that we used last time to avoid creating
352352 // the same deployment in another shard
353- let ( shard, node_id) = self . place ( & name, & network_name, node_id) ?;
353+ let ( shard, node_id) = self . place ( & name, & network_name, node_id) . await ?;
354354 let mut conn = self . primary_conn ( ) ?;
355355 let ( site, site_was_created) = conn
356356 . allocate_site ( shard, schema. id ( ) , network_name, graft_base)
@@ -645,7 +645,7 @@ impl Inner {
645645 store. find_layout ( site)
646646 }
647647
648- fn place_on_node (
648+ async fn place_on_node (
649649 & self ,
650650 mut nodes : Vec < NodeId > ,
651651 default_node : NodeId ,
@@ -660,7 +660,7 @@ impl Inner {
660660 let mut conn = self . primary_conn ( ) ?;
661661
662662 // unwrap is fine since nodes is not empty
663- let node = conn. least_assigned_node ( & nodes) ?. unwrap ( ) ;
663+ let node = conn. least_assigned_node ( & nodes) . await ?. unwrap ( ) ;
664664 Ok ( node)
665665 }
666666 }
@@ -680,7 +680,7 @@ impl Inner {
680680 }
681681 }
682682
683- fn place (
683+ async fn place (
684684 & self ,
685685 name : & SubgraphName ,
686686 network_name : & str ,
@@ -699,7 +699,7 @@ impl Inner {
699699 match placement {
700700 None => Ok ( ( PRIMARY_SHARD . clone ( ) , default_node) ) ,
701701 Some ( ( shards, nodes) ) => {
702- let node = self . place_on_node ( nodes, default_node) ?;
702+ let node = self . place_on_node ( nodes, default_node) . await ?;
703703 let shard = self . place_in_shard ( shards) ?;
704704
705705 Ok ( ( shard, node) )
0 commit comments