|
1 | | -import json |
2 | 1 | import logging |
3 | 2 | import subprocess |
4 | 3 | import threading |
|
10 | 9 | from typing import Dict, List, Optional |
11 | 10 | from urllib.parse import urlparse |
12 | 11 |
|
13 | | -import murfey.client.websocket |
14 | 12 | from murfey.client.analyser import Analyser |
15 | 13 | from murfey.client.context import ensure_dcg_exists |
16 | 14 | from murfey.client.contexts.spa import SPAModularContext |
@@ -97,11 +95,6 @@ def __post_init__(self): |
97 | 95 | self.rsync_processes = self.rsync_processes or {} |
98 | 96 | self.analysers = self.analysers or {} |
99 | 97 |
|
100 | | - self.ws = murfey.client.websocket.WSApp( |
101 | | - server=self.murfey_url, |
102 | | - register_client=False, |
103 | | - ) |
104 | | - |
105 | 98 | # Calculate the time offset between the client and the server |
106 | 99 | current_time = datetime.now() |
107 | 100 | server_timestamp = capture_get( |
@@ -182,17 +175,6 @@ def clean_up_once_dormant(self, running_threads: list[threading.Thread]): |
182 | 175 | if not success: |
183 | 176 | log.warning(f"Could not delete database data for {self.session_id}") |
184 | 177 |
|
185 | | - # Send message to frontend to trigger a refresh |
186 | | - self.ws.send( |
187 | | - json.dumps( |
188 | | - { |
189 | | - "message": "refresh", |
190 | | - "target": "sessions", |
191 | | - "instrument_name": self.instrument_name, |
192 | | - } |
193 | | - ) |
194 | | - ) |
195 | | - |
196 | 178 | # Mark as dormant |
197 | 179 | self.dormant = True |
198 | 180 |
|
@@ -293,15 +275,6 @@ def _start_rsyncer_multigrid( |
293 | 275 | transfer=machine_data.get("data_transfer_enabled", True), |
294 | 276 | restarted=str(source) in self.rsync_restarts, |
295 | 277 | ) |
296 | | - self.ws.send( |
297 | | - json.dumps( |
298 | | - { |
299 | | - "message": "refresh", |
300 | | - "target": "rsyncer", |
301 | | - "session_id": self.session_id, |
302 | | - } |
303 | | - ) |
304 | | - ) |
305 | 278 |
|
306 | 279 | def _rsyncer_stopped(self, source: Path, explicit_stop: bool = False): |
307 | 280 | if explicit_stop: |
|
0 commit comments