Skip to content

Commit cc72af3

Browse files
committed
Do not crash analyser if dcg fails
1 parent 280155b commit cc72af3

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/murfey/client/multigrid_control.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,15 @@ def _start_dc(self, metadata_json):
566566
+ "/".join(source.parts[-2:])
567567
)
568568
metadata_source = Path(metadata_source_as_str.replace("//", "/"))
569-
ensure_dcg_exists(
570-
collection_type="spa",
571-
metadata_source=metadata_source,
572-
environment=self._environment,
573-
token=self.token,
574-
)
569+
try:
570+
ensure_dcg_exists(
571+
collection_type="spa",
572+
metadata_source=metadata_source,
573+
environment=self._environment,
574+
token=self.token,
575+
)
576+
except Exception as e:
577+
log.error(f"Failed to register data collection group: {e}")
575578
data = {
576579
"voltage": metadata_json["voltage"],
577580
"pixel_size_on_image": metadata_json["pixel_size_on_image"],

0 commit comments

Comments
 (0)