Skip to content

Commit f9a1afc

Browse files
committed
better ssh updates
1 parent 7f265cb commit f9a1afc

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/amauo/commands/create.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@ def setup_instance(instance: Any, instance_key: str) -> None:
386386
thread_name = f"Setup-{instance_id}"
387387
threading.current_thread().name = thread_name
388388

389+
# Immediately update status to show thread is running
390+
update_status_func(instance_key, "⏳ Initializing SSH check...")
391+
logger.info(f"[{instance_id} @ {instance_ip}] Thread started - initializing")
392+
389393
try:
390394
# Wait for SSH to be available
391395
logger.info(f"[{instance_id} @ {instance_ip}] Waiting for SSH...")
@@ -540,9 +544,10 @@ def progress_callback(phase: str, progress: int, status: str) -> None:
540544
error_msg = f"{error_msg[:37]}..."
541545
update_status_func(instance_key, f"ERROR: {error_msg}", is_final=True)
542546

543-
# Process instances in parallel
547+
# Process instances in parallel (max 10 concurrent connections)
548+
max_workers = min(len(instances), 10)
544549
with ThreadPoolExecutor(
545-
max_workers=len(instances), thread_name_prefix="Setup"
550+
max_workers=max_workers, thread_name_prefix="Setup"
546551
) as executor:
547552
futures = []
548553
for i, instance in enumerate(instances):

0 commit comments

Comments
 (0)