DiamondLightSource / DiamondLightSource/mx-bluesky
Investigate removing activity gated callbacks
- Dominant language
- Python
- Stars
- 4
- Forks
- 5
- Avg merge
- 1d 30m
- Merged PRs (30d)
- 2
Description
The idea of activity gated callbacks was created to mitigate callbacks getting events not made for them now that the callbacks are always running. However, both @DominicOram and @dperl-dls dislike them:
* @DominicOram thinks that having both the activity flag in the metadata and checking the run name in the start document means that ones redundant
* @dperl-dls thinks they make it confusing when we have callbacks that are chained from other callbacks
* Both dislike the extra layer in general
## Acceptance Criteria
* Remove the activity gate
* Make sure in every callback when we get a start/event we have a check like `if doc.get("subplan_name") == CONST.PLAN.ROTATION_OUTER:` to make sure we're only doing something on the expected events
* Make sure in the stops we match them to the start we care about and teardown anything that needs cleaning up
* Make `subplan_name` a constant
* Document this pattern and reasoning behind it - send this to core as an FYI
Contributor guide
Assessment
This issue has not been assessed yet.