feat: pause for user input before destroying instance
Update the cleanup process in vast_start.py to require the user to press ENTER before destroying the instance. This change prevents immediate automatic termination after the subprocess ends, giving the user control over when to tear down the environment.
This commit is contained in:
@@ -247,10 +247,12 @@ def main():
|
||||
except Exception as e:
|
||||
print(f"\nAn error occurred during instance setup: {e}")
|
||||
finally:
|
||||
# Ask user if they want to clean up, or just do it automatically
|
||||
# Based on original script, it immediately destroys the instance after the subprocess ends
|
||||
print("\nCleaning up...")
|
||||
if instance_id:
|
||||
try:
|
||||
input("\nPress ENTER to destroy the instance and clean up...")
|
||||
except (EOFError, KeyboardInterrupt):
|
||||
pass
|
||||
print("\nCleaning up...")
|
||||
destroy_instance(instance_id)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user