diff --git a/src/subprocess_util/chunked_transfer/__init__.py b/src/subprocess_util/chunked_transfer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/subprocess_util/chunked_transfer/active_receive/__init__.py b/src/subprocess_util/chunked_transfer/active_receive/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/subprocess_util/btrfs_receive_chunks_active.py b/src/subprocess_util/chunked_transfer/active_receive/btrfs_receive_chunks_active.py similarity index 95% rename from src/subprocess_util/btrfs_receive_chunks_active.py rename to src/subprocess_util/chunked_transfer/active_receive/btrfs_receive_chunks_active.py index 194923f..1ae38f2 100644 --- a/src/subprocess_util/btrfs_receive_chunks_active.py +++ b/src/subprocess_util/chunked_transfer/active_receive/btrfs_receive_chunks_active.py @@ -3,7 +3,7 @@ import argparse from pathlib import Path -from subprocess_util.exec_receive_chunks_active import exec_receive_chunks_active +from subprocess_util.chunked_transfer.active_receive.exec_receive_chunks_active import exec_receive_chunks_active def main(): diff --git a/src/subprocess_util/btrfs_send_chunks_passive.py b/src/subprocess_util/chunked_transfer/active_receive/btrfs_send_chunks_passive.py similarity index 96% rename from src/subprocess_util/btrfs_send_chunks_passive.py rename to src/subprocess_util/chunked_transfer/active_receive/btrfs_send_chunks_passive.py index b2c9a49..9ef249c 100644 --- a/src/subprocess_util/btrfs_send_chunks_passive.py +++ b/src/subprocess_util/chunked_transfer/active_receive/btrfs_send_chunks_passive.py @@ -3,7 +3,7 @@ import argparse from pathlib import Path -from subprocess_util.exec_send_chunks_passive import exec_send_chunks_passive +from subprocess_util.chunked_transfer.active_receive.exec_send_chunks_passive import exec_send_chunks_passive def main(): diff --git a/src/subprocess_util/common.py b/src/subprocess_util/chunked_transfer/active_receive/common.py similarity index 100% rename from src/subprocess_util/common.py rename to src/subprocess_util/chunked_transfer/active_receive/common.py diff --git a/src/subprocess_util/exec_receive_chunks_active.py b/src/subprocess_util/chunked_transfer/active_receive/exec_receive_chunks_active.py similarity index 95% rename from src/subprocess_util/exec_receive_chunks_active.py rename to src/subprocess_util/chunked_transfer/active_receive/exec_receive_chunks_active.py index cdd14d6..0bc80c2 100644 --- a/src/subprocess_util/exec_receive_chunks_active.py +++ b/src/subprocess_util/chunked_transfer/active_receive/exec_receive_chunks_active.py @@ -2,7 +2,7 @@ import shlex from pathlib import Path from queue import Queue -from subprocess_util.common import Message2, Message1 +from subprocess_util.chunked_transfer.active_receive.common import Message2, Message1 from subprocess_util.exec_consume_chunks import execute_consume_chunks from subprocess_util.repeat import repeat_until_successful @@ -35,7 +35,7 @@ def exec_receive_chunks_active( usr_confirmation_socket = target_chunk_path.parent.joinpath(f'{chunk_no}.SOCKET') - chunk_created_path = get_source_created_path() + chunk_created_path = get_source_created_path(chunk_no) chunk_created_cmd = ['ssh', ssh_source, f'cat {shlex.quote(str(chunk_created_path))} && rm {shlex.quote(str(chunk_created_path))}'] diff --git a/src/subprocess_util/exec_send_chunks_passive.py b/src/subprocess_util/chunked_transfer/active_receive/exec_send_chunks_passive.py similarity index 95% rename from src/subprocess_util/exec_send_chunks_passive.py rename to src/subprocess_util/chunked_transfer/active_receive/exec_send_chunks_passive.py index 252d83a..31478ed 100644 --- a/src/subprocess_util/exec_send_chunks_passive.py +++ b/src/subprocess_util/chunked_transfer/active_receive/exec_send_chunks_passive.py @@ -1,7 +1,7 @@ import socket from pathlib import Path -from subprocess_util.common import Message1, Message2 +from subprocess_util.chunked_transfer.active_receive.common import Message1, Message2 from subprocess_util.exec_produce_chunks import execute_produce_chunks from subprocess_util.unix_sock_input import accept_loop_until_message diff --git a/src/subprocess_util/chunked_transfer/active_send/__init__.py b/src/subprocess_util/chunked_transfer/active_send/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/subprocess_util/btrfs_receive_chunks_passive.py b/src/subprocess_util/chunked_transfer/active_send/btrfs_receive_chunks_passive.py similarity index 93% rename from src/subprocess_util/btrfs_receive_chunks_passive.py rename to src/subprocess_util/chunked_transfer/active_send/btrfs_receive_chunks_passive.py index 940dec2..44038f7 100644 --- a/src/subprocess_util/btrfs_receive_chunks_passive.py +++ b/src/subprocess_util/chunked_transfer/active_send/btrfs_receive_chunks_passive.py @@ -3,7 +3,7 @@ import argparse from pathlib import Path -from subprocess_util.exec_receive_chunks_passive import exec_receive_chunks_passive +from subprocess_util.chunked_transfer.active_send.exec_receive_chunks_passive import exec_receive_chunks_passive def main(): diff --git a/src/subprocess_util/btrfs_send_chunks_active.py b/src/subprocess_util/chunked_transfer/active_send/btrfs_send_chunks_active.py similarity index 97% rename from src/subprocess_util/btrfs_send_chunks_active.py rename to src/subprocess_util/chunked_transfer/active_send/btrfs_send_chunks_active.py index ab23189..ab34e9e 100644 --- a/src/subprocess_util/btrfs_send_chunks_active.py +++ b/src/subprocess_util/chunked_transfer/active_send/btrfs_send_chunks_active.py @@ -3,7 +3,7 @@ import argparse from pathlib import Path -from subprocess_util.exec_send_chunks_active import exec_send_chunks_active +from subprocess_util.chunked_transfer.active_send.exec_send_chunks_active import exec_send_chunks_active def main(): diff --git a/src/subprocess_util/exec_receive_chunks_passive.py b/src/subprocess_util/chunked_transfer/active_send/exec_receive_chunks_passive.py similarity index 100% rename from src/subprocess_util/exec_receive_chunks_passive.py rename to src/subprocess_util/chunked_transfer/active_send/exec_receive_chunks_passive.py diff --git a/src/subprocess_util/exec_send_chunks_active.py b/src/subprocess_util/chunked_transfer/active_send/exec_send_chunks_active.py similarity index 100% rename from src/subprocess_util/exec_send_chunks_active.py rename to src/subprocess_util/chunked_transfer/active_send/exec_send_chunks_active.py