|
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 |
@@ -96,11 +94,6 @@ def __post_init__(self): |
96 | 94 | self.rsync_processes = self.rsync_processes or {} |
97 | 95 | self.analysers = self.analysers or {} |
98 | 96 |
|
99 | | - self.ws = murfey.client.websocket.WSApp( |
100 | | - server=self.murfey_url, |
101 | | - register_client=False, |
102 | | - ) |
103 | | - |
104 | 97 | # Calculate the time offset between the client and the server |
105 | 98 | current_time = datetime.now() |
106 | 99 | server_timestamp = capture_get( |
@@ -181,17 +174,6 @@ def clean_up_once_dormant(self, running_threads: list[threading.Thread]): |
181 | 174 | if not success: |
182 | 175 | log.warning(f"Could not delete database data for {self.session_id}") |
183 | 176 |
|
184 | | - # Send message to frontend to trigger a refresh |
185 | | - self.ws.send( |
186 | | - json.dumps( |
187 | | - { |
188 | | - "message": "refresh", |
189 | | - "target": "sessions", |
190 | | - "instrument_name": self.instrument_name, |
191 | | - } |
192 | | - ) |
193 | | - ) |
194 | | - |
195 | 177 | # Mark as dormant |
196 | 178 | self.dormant = True |
197 | 179 |
|
@@ -289,15 +271,6 @@ def _start_rsyncer_multigrid( |
289 | 271 | transfer=machine_data.get("data_transfer_enabled", True), |
290 | 272 | restarted=str(source) in self.rsync_restarts, |
291 | 273 | ) |
292 | | - self.ws.send( |
293 | | - json.dumps( |
294 | | - { |
295 | | - "message": "refresh", |
296 | | - "target": "rsyncer", |
297 | | - "session_id": self.session_id, |
298 | | - } |
299 | | - ) |
300 | | - ) |
301 | 274 |
|
302 | 275 | def _rsyncer_stopped(self, source: Path, explicit_stop: bool = False): |
303 | 276 | if explicit_stop: |
|
0 commit comments