Commit 6a33e965 authored by Gary Ruben (Monash University)'s avatar Gary Ruben (Monash University)
Browse files

Prepended some commands with nice at Ron Bosworth's request, to reduce CPU...

Prepended some commands with nice at Ron Bosworth's request, to reduce CPU impact on the synchrotron side.
parent e74b5130
......@@ -105,7 +105,7 @@ def send_directory(node, remote_login, src_path):
# Check if there are any files in the node.
with Connection(remote_login) as c:
files = c.run(
rf"cd {node.src}; find -maxdepth 1 -type f -printf '%f\n'",
rf"cd {node.src}; nice find -maxdepth 1 -type f -printf '%f\n'",
echo=True
)
files = files.stdout.strip()
......@@ -135,7 +135,7 @@ def send_directory(node, remote_login, src_path):
output = subprocess.run(
f"ssh {remote_login} 'cd {node.src};"
f"find -maxdepth 1 -type f -print0 |"
f"nice find -maxdepth 1 -type f -print0 |"
f"cpio -o -H ustar -0' | cat > {node.dest}/{filename}.tar",
shell=True,
check=True
......
......@@ -102,7 +102,7 @@ def send_checksum(node, remote_login, src_path):
filename = node.src.replace(src_path+'/', '').replace('/', '_')
output = subprocess.run(
f"ssh {remote_login} 'cd {node.src}; md5sum *'"
f"ssh {remote_login} 'cd {node.src}; nice md5sum *'"
f"| cat > {node.dest}/{filename}.md5",
shell=True,
check=True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment