@@ -151,9 +151,10 @@ def down():
151151 """Bring down a running warnet quickly"""
152152
153153 def uninstall_release (namespace , release_name ):
154- cmd = f"helm uninstall { release_name } --namespace { namespace } --wait=false"
155- subprocess .Popen (cmd , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .DEVNULL )
156- return f"Initiated uninstall for: { release_name } in namespace { namespace } "
154+ cmd = f"helm uninstall { release_name } --namespace { namespace } --wait"
155+ print (f"Initiating uninstall of { release_name } in namespace { namespace } " )
156+ subprocess .run (cmd , shell = True , stdout = subprocess .DEVNULL , stderr = subprocess .DEVNULL )
157+ return f"Uninstalled { release_name } in namespace { namespace } "
157158
158159 def delete_pod (pod_name , namespace ):
159160 cmd = f"kubectl delete pod --ignore-not-found=true { pod_name } -n { namespace } --grace-period=0 --force"
@@ -215,6 +216,13 @@ def delete_pod(pod_name, namespace):
215216 executor .submit (uninstall_release , release ["namespace" ], release ["name" ])
216217 )
217218
219+ # Wait for all tasks to complete and print results
220+ for future in as_completed (futures ):
221+ console .print (f"[yellow]{ future .result ()} [/yellow]" )
222+
223+ with ThreadPoolExecutor (max_workers = 10 ) as executor :
224+ futures = []
225+
218226 # Delete remaining pods
219227 pods = get_pods ()
220228 for pod in pods :
0 commit comments