DiamondLightSource / DiamondLightSource/mx-bluesky
Zocalo environment not properly deactivated
- Dominant language
- Python
- Stars
- 4
- Forks
- 5
- Avg merge
- 1d 30m
- Merged PRs (30d)
- 2
Description
Found with @jacob720
The mx-bluesky code connects and disconnects to the zocalo transport at the correct points, but we think the `activate_environment` part is never being undone. This means that whatever this function does is never really undone until the python environment is reset. One issue that has came from this is logs being spammed in the zocalo stream. See https://github.com/DiamondLightSource/mx-bluesky/issues/1605 for turning off those logs.
In the meantime we've just disabled the zocalo stream from picking up bluesky logs (by removing logging: graylog from the zocalo "bluesky" config environment). If other issues are seen relating to zocalo not cleaning things up, this issue may be why
## Acceptance Criteria
- Add some kind of "deactivate environment" function which undoes the activate function, and confirm that after this, with the zocalo bluesky logging turned on in the zocalo environment, that bluesky logging no longer spams the zocalo stream without getting cleared up
Contributor guide
Assessment
This issue has not been assessed yet.