@@ -206,7 +206,7 @@ fn group_resource_states<'a>(
206206 Ok ( grouped)
207207}
208208
209- pub fn check_flow_setup_status (
209+ pub async fn check_flow_setup_status (
210210 desired_state : Option < & FlowSetupState < DesiredMode > > ,
211211 existing_state : Option < & FlowSetupState < ExistingMode > > ,
212212) -> Result < FlowSetupStatusCheck > {
@@ -286,12 +286,16 @@ pub fn check_flow_setup_status(
286286 let status_check = if never_setup_by_sys {
287287 None
288288 } else {
289- Some ( factory. check_setup_status (
290- & resource_id. key ,
291- target_state,
292- existing_without_setup_by_user,
293- get_auth_registry ( ) ,
294- ) ?)
289+ Some (
290+ factory
291+ . check_setup_status (
292+ & resource_id. key ,
293+ target_state,
294+ existing_without_setup_by_user,
295+ get_auth_registry ( ) ,
296+ )
297+ . await ?,
298+ )
295299 } ;
296300 target_resources. push ( ResourceSetupInfo {
297301 key : resource_id. clone ( ) ,
@@ -310,7 +314,7 @@ pub fn check_flow_setup_status(
310314 } )
311315}
312316
313- pub fn sync_setup (
317+ pub async fn sync_setup (
314318 flows : & BTreeMap < String , Arc < FlowContext > > ,
315319 all_setup_state : & AllSetupState < ExistingMode > ,
316320) -> Result < AllSetupStatusCheck > {
@@ -319,7 +323,7 @@ pub fn sync_setup(
319323 let existing_state = all_setup_state. flows . get ( flow_name) ;
320324 flow_status_checks. insert (
321325 flow_name. clone ( ) ,
322- check_flow_setup_status ( Some ( & flow_context. flow . desired_state ) , existing_state) ?,
326+ check_flow_setup_status ( Some ( & flow_context. flow . desired_state ) , existing_state) . await ?,
323327 ) ;
324328 }
325329 Ok ( AllSetupStatusCheck {
@@ -331,7 +335,7 @@ pub fn sync_setup(
331335 } )
332336}
333337
334- pub fn drop_setup (
338+ pub async fn drop_setup (
335339 flow_names : impl IntoIterator < Item = String > ,
336340 all_setup_state : & AllSetupState < ExistingMode > ,
337341) -> Result < AllSetupStatusCheck > {
@@ -343,7 +347,7 @@ pub fn drop_setup(
343347 if let Some ( existing_state) = all_setup_state. flows . get ( & flow_name) {
344348 flow_status_checks. insert (
345349 flow_name,
346- check_flow_setup_status ( None , Some ( existing_state) ) ?,
350+ check_flow_setup_status ( None , Some ( existing_state) ) . await ?,
347351 ) ;
348352 }
349353 }
0 commit comments