Skip to content

Commit 13526d1

Browse files
committed
Added 'rsync_url' as an attribute to 'MurfeyInstanceEnvironment' class
1 parent e7bb542 commit 13526d1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/murfey/client/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ def run():
322322
default_destination=args.destination or str(datetime.now().year),
323323
demo=args.demo,
324324
processing_only_mode=server_routing_prefix_found,
325+
rsync_url=(
326+
urlparse(machine_data["rsync_url"]).hostname
327+
if machine_data.get("rsync_url")
328+
else ""
329+
),
325330
)
326331

327332
ws.environment = instance_environment

src/murfey/client/instance_environment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class MurfeyInstanceEnvironment(BaseModel):
5252
superres: bool = True
5353
murfey_session: Optional[int] = None
5454
samples: Dict[Path, SampleInfo] = {}
55+
rsync_url: str = ""
5556

5657
class Config:
5758
validate_assignment: bool = True

src/murfey/client/tui/screens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def on_button_pressed(self, event):
886886
rsync_cmd = [
887887
"rsync",
888888
f"{posix_path(self._dir_tree._gain_reference)!r}",
889-
f"{self.app._environment.url.hostname}::{self.app._machine_config.get('rsync_module', 'data')}/{visit_path}/processing/{secure_filename(self._dir_tree._gain_reference.name)}",
889+
f"{self.app._environment.rsync_url or self.app._environment.url.hostname}::{self.app._machine_config.get('rsync_module', 'data')}/{visit_path}/processing/{secure_filename(self._dir_tree._gain_reference.name)}",
890890
]
891891
# Encase in bash shell
892892
cmd = ["bash", "-c", " ".join(rsync_cmd)]

0 commit comments

Comments
 (0)