Commit 4f3fa6ec authored by Gary Ruben's avatar Gary Ruben
Browse files

fixed file count logic

parent 56d4f677
......@@ -54,7 +54,7 @@ from fabric import Connection
READ_PICKLE_FILE = False
EXPERIMENT_NAME = "13660b"
EXPERIMENT_NAME = "13660a"
PICKLE_FILENAME = os.path.join(os.path.dirname(__file__), "tree_state.pickle")
timestamp = time.strftime("%Y-%m-%d-%H%M%S")
LOG_FILENAME = os.path.join(
......@@ -63,7 +63,7 @@ LOG_FILENAME = os.path.join(
)
REMOTE_LOGIN = "gary.ruben@monash.edu@sftp1.synchrotron.org.au"
SRC_PATH = f"/data/{EXPERIMENT_NAME}/asci/output"
DEST_PATH = "/home/grub0002/bapcxi/vault/IMBL_2018_Oct_McGillick"
DEST_PATH = "/home/grub0002/bapcxi/vault/IMBL_2018_Oct_McGillick/output"
@dataclass
......@@ -116,7 +116,7 @@ def tar_and_send_directory(node):
# print(f'Connection failed on {node.src}')
# node.error = "Connection failure on initial file find"
# return
node.count = files.count('\n')
node.count = len(files.splitlines())
print(f'Node:{node.src}, file count:{node.count}')
if node.count == 0:
......
......@@ -46,8 +46,8 @@ LOG_FILENAME = os.path.join(
f"md5-{EXPERIMENT_NAME}-{timestamp}.log"
)
REMOTE_LOGIN = "gary.ruben@monash.edu@sftp2.synchrotron.org.au"
SRC_PATH = f"/data/{EXPERIMENT_NAME}/asci/input"
DEST_PATH = "/home/grub0002/bapcxi/vault/IMBL_2018_Oct_McGillick"
SRC_PATH = f"/data/{EXPERIMENT_NAME}/asci/output"
DEST_PATH = "/home/grub0002/bapcxi/vault/IMBL_2018_Oct_McGillick/output"
@dataclass
......@@ -95,7 +95,7 @@ def send_checksum(node):
echo=True
)
files = files.stdout.strip()
node.count = files.count('\n')
node.count = len(files.splitlines())
print(f'Node:{node.src}, file count:{node.count}')
if node.count == 0:
......
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