File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,23 @@ impl super::Instruction for Instruction {
145145 sleep ( Duration :: from_millis ( args. apply_interval_ms ) ) . await ;
146146 Ok :: < _ , Error > ( ( ) )
147147 } )
148+ . await ?;
149+
150+ items
151+ . iter ( )
152+ . map ( |x| async move { Ok ( x) } )
153+ . collect :: < FuturesUnordered < _ > > ( )
154+ . try_for_each_concurrent ( args. num_threads , |( namespace, name) | async {
155+ let api = Api :: < ModelClaimCrd > :: namespaced ( kube. clone ( ) , namespace) ;
156+ loop {
157+ let object = api. get_metadata_opt ( name) . await ?;
158+ if object. is_none ( ) {
159+ break ;
160+ }
161+ sleep ( Duration :: from_millis ( args. apply_interval_ms ) ) . await ;
162+ }
163+ Ok :: < _ , Error > ( ( ) )
164+ } )
148165 . await
149166 }
150167}
Original file line number Diff line number Diff line change @@ -144,7 +144,6 @@ impl super::Instruction for Instruction {
144144 propagation_policy : Some ( PropagationPolicy :: Foreground ) ,
145145 ..Default :: default ( )
146146 } ;
147-
148147 namespaces
149148 . iter ( )
150149 . map ( |x| async move { Ok ( x) } )
You can’t perform that action at this time.
0 commit comments