Skip to content

Commit e3fc2aa

Browse files
committed
Remove the old tui force metadata code
1 parent 0df33b0 commit e3fc2aa

2 files changed

Lines changed: 1 addition & 27 deletions

File tree

src/murfey/client/multigrid_control.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class MultigridController:
4040
finalising: bool = False
4141
dormant: bool = False
4242
multigrid_watcher_active: bool = True
43-
processing_enabled: bool = True
4443
do_transfer: bool = True
4544
dummy_dc: bool = False
4645
force_mdoc_metadata: bool = True
@@ -86,8 +85,6 @@ def __post_init__(self):
8685
for ds in val.values()
8786
for s in ds
8887
]
89-
self._data_collection_form_complete = False
90-
self._register_dc: bool | None = None
9188
self.rsync_processes = self.rsync_processes or {}
9289
self.analysers = self.analysers or {}
9390

@@ -260,7 +257,6 @@ def _start_rsyncer_multigrid(
260257
self._start_rsyncer(
261258
source,
262259
destination,
263-
force_metadata=self.processing_enabled,
264260
analyse=analyse,
265261
remove_files=remove_files,
266262
tag=tag,
@@ -324,7 +320,6 @@ def _start_rsyncer(
324320
source: Path,
325321
destination: str,
326322
visit_path: str = "",
327-
force_metadata: bool = False,
328323
analyse: bool = True,
329324
remove_files: bool = False,
330325
tag: str = "",
@@ -455,12 +450,7 @@ def rsync_result(update: RSyncerUpdate):
455450
force_mdoc_metadata=self.force_mdoc_metadata,
456451
limited=limited,
457452
)
458-
if force_metadata:
459-
self.analysers[source].subscribe(
460-
partial(self._start_dc, from_form=True)
461-
)
462-
else:
463-
self.analysers[source].subscribe(self._data_collection_form)
453+
self.analysers[source].subscribe(partial(self._start_dc, from_form=True))
464454
self.analysers[source].start()
465455
if transfer:
466456
self.rsync_processes[source].subscribe(self.analysers[source].enqueue)
@@ -502,21 +492,6 @@ def _rsync_update_converter(p: Path) -> None:
502492
)
503493
self._environment.watchers[source].start()
504494

505-
def _data_collection_form(self, response: dict):
506-
log.info("data collection form ready")
507-
if self._data_collection_form_complete:
508-
return
509-
if self._register_dc and response.get("form"):
510-
self._form_values = {k: str(v) for k, v in response.get("form", {}).items()}
511-
log.info(
512-
f"gain reference is set to {self._form_values.get('gain_ref')}, {self._environment.gain_ref}"
513-
)
514-
if self._form_values.get("gain_ref") in (None, "None"):
515-
self._form_values["gain_ref"] = self._environment.gain_ref
516-
self._data_collection_form_complete = True
517-
elif self._register_dc is None:
518-
self._data_collection_form_complete = True
519-
520495
def _start_dc(self, metadata_json, from_form: bool = False):
521496
if self.dummy_dc:
522497
return

src/murfey/instrument_server/api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ def setup_multigrid_watcher(
174174
session_id,
175175
murfey_url=_get_murfey_url(),
176176
do_transfer=True,
177-
processing_enabled=not watcher_spec.skip_existing_processing,
178177
_machine_config=machine_config,
179178
token=tokens.get(session_id, "token"),
180179
data_collection_parameters=data_collection_parameters.get(label, {}),

0 commit comments

Comments
 (0)