DiamondLightSource / DiamondLightSource/blueapi
`blueapi controller run <plan>` hangs after the conclusion of a plan
- Dominant language
- Python
- Stars
- 13
- Forks
- 13
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 25
Description
with config (copied from docs...)
```yaml
env:
sources:
- kind: dodal
module: mx_bluesky.ui_working.devices
- kind: planFunctions
module: mx_bluesky.ui_working.plans
stomp:
host: localhost
port: 61613
auth:
username: guest
# This is for local development only, production systems should use good passwords
password: guest
```
and the `mx-bluesky` branch `i23_and_ui_testing` which has some extremely simple plans of the like
```python
@bpp.run_decorator()
def virtual_relative_move_um(x_um: float, y_um: float) -> MsgGenerator:
"""
Used for click-to-move on an OAV. Moves the gonio a relative distance of x and y to
bring the clicked location to the beam centre. Takes account of the goniometer omega
position in order to do the relative move in the lab frame.
"""
gonio = devices.vgonio()
LOGGER.info(
f"Current position: {yield from bps.rd(gonio.x)}, {yield from bps.rd(gonio.yh)}"
)
yield from bps.rel_set(gonio.x, x_um, wait=True)
yield from bps.rel_set(gonio.yh, y_um, wait=True)
LOGGER.info(
f"New position: {yield from bps.rd(gonio.x)}, {yield from bps.rd(gonio.yh)}"
)
```
where `gonio` is prepared using the old-style `device_instantiation` because I could set the mock arg to `True` there...
running
```bash
╰─>$ blueapi --config stomp.yml controller run virtual_relative_move_um '{"x_um": 4, "y_um": 23}'
2024-11-29 12:21:44,255 - Connecting...
2024-11-29 12:21:44,256 - established connection to host localhost, port 61613
2024-11-29 12:21:44,258 - Subscribing to name='public.worker.event'
```
hangs forever. the plan runs successfully and the worker returns to idle state but the controller (presumably) waits for this event forever.
Contributor guide
Assessment
This issue has not been assessed yet.