Skip to content

Commit

Permalink
detach the command
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Feb 5, 2025
1 parent aff600d commit 5428b14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pioreactor/utils/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

def ssh(address: str, command: str):
try:
detached_command = f"nohup {command} > /dev/null 2>&1 &"
subprocess.run(
["ssh", "-o", "ConnectTimeout=5", address, command],
["ssh", "-o", "ConnectTimeout=5", address, detached_command],
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down

0 comments on commit 5428b14

Please sign in to comment.