Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
#1192 rationalise tagging btw ispyb super/subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
dperl-dls committed Mar 1, 2024
1 parent 88a0dba commit 22f3f66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def __init__(
self.log = ISPYB_LOGGER

def activity_gated_start(self, doc: RunStart):
ISPYB_LOGGER.debug("ISPyB Callback Start Triggered")
if self.uid_to_finalize_on is None:
self.uid_to_finalize_on = doc.get("uid")
return self._tag_doc(doc)

def activity_gated_descriptor(self, doc: EventDescriptor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def activity_gated_start(self, doc: RunStart):
ISPYB_LOGGER.info("ISPYB handler received start document.")
if doc.get("subplan_name") == ROTATION_PLAN_MAIN:
self.uid_to_finalize_on = doc.get("uid")
return self._tag_doc(doc)
return super().activity_gated_start(doc)

def activity_gated_event(self, doc: Event):
doc = super().activity_gated_event(doc)
set_dcgid_tag(self.ispyb_ids.data_collection_group_id)
return self._tag_doc(doc)
return doc

def activity_gated_stop(self, doc: RunStop):
if doc.get("run_start") == self.uid_to_finalize_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def activity_gated_event(self, doc: Event):
)

set_dcgid_tag(self.ispyb_ids.data_collection_group_id)
return self._tag_doc(doc)
return doc

def activity_gated_stop(self, doc: RunStop):
if doc.get("run_start") == self._start_of_fgs_uid:
Expand Down

0 comments on commit 22f3f66

Please sign in to comment.