Browse Source

Set pipelined writes

Gabriel Adrian Samfira 8 years ago
parent
commit
52e01c4b54
1 changed files with 4 additions and 1 deletions
  1. 4 1
      coriolis/utils.py

+ 4 - 1
coriolis/utils.py

@@ -154,7 +154,10 @@ def read_ssh_file(ssh, remote_path):
 @retry_on_error()
 @retry_on_error()
 def write_ssh_file(ssh, remote_path, content):
 def write_ssh_file(ssh, remote_path, content):
     sftp = ssh.open_sftp()
     sftp = ssh.open_sftp()
-    sftp.open(remote_path, 'wb').write(content)
+    fd = sftp.open(remote_path, 'wb')
+    fd.set_pipelined(True)
+    fd.write(content)
+    fd.close()
 
 
 
 
 @retry_on_error()
 @retry_on_error()