Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/murfey/client/multigrid_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class MultigridController:
instrument_name: str
session_id: int
murfey_url: str = "http://localhost:8000"
rsync_url: str = ""
demo: bool = False
processing_enabled: bool = True
do_transfer: bool = True
Expand All @@ -57,6 +58,7 @@ def __post_init__(self):
machine_data = requests.get(
f"{self.murfey_url}/instruments/{self.instrument_name}/machine"
).json()
self.rsync_url = machine_data.get("rsync_url", "")
self._environment = MurfeyInstanceEnvironment(
url=urlparse(self.murfey_url, allow_fragments=False),
client_id=0,
Expand Down Expand Up @@ -209,7 +211,11 @@ def _start_rsyncer(
self.rsync_processes[source] = RSyncer(
source,
basepath_remote=Path(destination),
server_url=self._environment.url,
server_url=(
urlparse(self.rsync_url)
if self.rsync_url
else self._environment.url
),
stop_callback=self._rsyncer_stopped,
do_transfer=self.do_transfer,
remove_files=remove_files,
Expand Down
4 changes: 3 additions & 1 deletion src/murfey/client/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def _start_rsyncer_multigrid(
remove_files=remove_files,
limited=limited,
transfer=machine_data.get("data_transfer_enabled", True),
rsync_url=machine_data.get("rsync_url", ""),
)

def _start_rsyncer(
Expand All @@ -199,6 +200,7 @@ def _start_rsyncer(
remove_files: bool = False,
limited: bool = False,
transfer: bool = True,
rsync_url: str = "",
):
log.info(f"starting rsyncer: {source}")
if self._environment:
Expand Down Expand Up @@ -226,7 +228,7 @@ def _start_rsyncer(
self.rsync_processes[source] = RSyncer(
source,
basepath_remote=Path(destination),
server_url=self._url,
server_url=urlparse(rsync_url) if rsync_url else self._url,
# local=self._environment.demo,
status_bar=self._statusbar,
do_transfer=self._do_transfer,
Expand Down
1 change: 1 addition & 0 deletions src/murfey/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class MachineConfig(BaseModel, extra=Extra.allow): # type: ignore
instrument_server_url: str = "http://localhost:8001"
frontend_url: str = "http://localhost:3000"
murfey_url: str = "http://localhost:8000"
rsync_url: str = ""

security_configuration_path: Optional[Path] = None
auth_url: str = ""
Expand Down
Loading