Skip to content

Commit

Permalink
Some PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rernst committed Jan 30, 2024
1 parent 3a46ec1 commit 4953db4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rsync_to_rdisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def connect_to_remote_server(host_keys, servers, user, run_file):
return client, hpc_server


def get_folders_remote_server(client, mount_transfer_settings, run_file, transferred_set):
def get_folders_remote_server(client, transfers, run_file, transferred_set):
to_be_transferred = {}
for transfer in mount_transfer_settings['transfers']:
for transfer in transfers:
try:
stdin, stdout, stderr = client.exec_command("ls {}".format(transfer["input"]))
except (ConnectionResetError, TimeoutError):
Expand Down Expand Up @@ -366,7 +366,7 @@ def upload_exomedepth_vcf(run, run_folder):
# Get folders to be transferred
to_be_transferred = get_folders_remote_server(
client,
settings.transfer_settings[mount_name],
settings.transfer_settings[mount_name]['transfers'],
run_file,
transferred_set
)
Expand All @@ -375,6 +375,9 @@ def upload_exomedepth_vcf(run, run_folder):
rsync_succes = rsync_server_remote(hpc_server, client, to_be_transferred, mount_path, run_file)
if not rsync_succes:
remove_run_file = False
else: # Mount not available block upcoming transfers
# TODO: Do we want this?
remove_run_file = False

# Remove run_file if transfer daemon shouldn't be blocked to prevent repeated mailing.
if remove_run_file:
Expand Down

0 comments on commit 4953db4

Please sign in to comment.