Fix deployment script health check bug
Fixed TypeError in SSHDeployer.execute_remote() method by adding 'silent' parameter - Added silent parameter with default value False - Modified print statements to respect silent mode - Health checks now work correctly during deployment This ensures the deployment script can properly wait for services to start and validate the deployment
This commit is contained in:
parent
2f94c083b9
commit
11baac8f21
|
|
@ -83,25 +83,27 @@ class SSHDeployer:
|
|||
print(f"❌ SSH connection failed: {e}")
|
||||
return False
|
||||
|
||||
def execute_remote(self, command: str, description: str = "") -> bool:
|
||||
def execute_remote(self, command: str, description: str = "", silent: bool = False) -> bool:
|
||||
"""Execute command on remote server"""
|
||||
try:
|
||||
if description:
|
||||
if description and not silent:
|
||||
print(f"🔧 {description}")
|
||||
|
||||
stdin, stdout, stderr = self.ssh_client.exec_command(command)
|
||||
exit_status = stdout.channel.recv_exit_status()
|
||||
|
||||
if exit_status == 0:
|
||||
if description:
|
||||
if description and not silent:
|
||||
print(f" ✅ {description} completed")
|
||||
return True
|
||||
else:
|
||||
error_output = stderr.read().decode()
|
||||
if not silent:
|
||||
print(f" ❌ {description} failed: {error_output}")
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
if not silent:
|
||||
print(f" ❌ {description} failed: {e}")
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue