You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the session.run_cmd() to launch a swarm agent on remote machine, the code for which is print("Launching swarm agent") result = sess.run_cmd(f'cd /D D:\\workdir\\utils\\swarm-client && start /max start-swarm-client.bat "{jenkins_config.jenkins_server_url}" {jenkins_config.jenkins_username} {jenkins_config.jenkins_pwd} {name} {vapp_ip_address} -labelsFile={file_path}') print("This part doesn't execute!")
Now the command works completely fine and I can see the process running on the remote machine. But on my pc, as long as I don't stop the swarm agent process manually on remote pc, control doesn't go to next line i.e. the line print("This part doesn't execute!") after result.
Is there any walkaround to go to the second print when the run_cmd()'s process starts running on remote, start executing the next line after run_cmd(), currently It gets stuck inside of run_cmd() command!
The text was updated successfully, but these errors were encountered:
salyas0v
changed the title
Close run_cmd() 's session as soon as the process starts running on remote machine
Close run_cmd() 's session as soon as the process starts running on remote machine and start executing the next line
Mar 9, 2022
I'm using the session.run_cmd() to launch a swarm agent on remote machine, the code for which is
print("Launching swarm agent") result = sess.run_cmd(f'cd /D D:\\workdir\\utils\\swarm-client && start /max start-swarm-client.bat "{jenkins_config.jenkins_server_url}" {jenkins_config.jenkins_username} {jenkins_config.jenkins_pwd} {name} {vapp_ip_address} -labelsFile={file_path}') print("This part doesn't execute!")
Now the command works completely fine and I can see the process running on the remote machine. But on my pc, as long as I don't stop the swarm agent process manually on remote pc, control doesn't go to next line i.e. the line
print("This part doesn't execute!")
after result.Is there any walkaround to go to the second print when the run_cmd()'s process starts running on remote, start executing the next line after run_cmd(), currently It gets stuck inside of run_cmd() command!
The text was updated successfully, but these errors were encountered: