Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blueapi controller run <plan> hangs after the conclusion of a plan #739

Open
d-perl opened this issue Nov 29, 2024 · 1 comment
Open

blueapi controller run <plan> hangs after the conclusion of a plan #739

d-perl opened this issue Nov 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@d-perl
Copy link
Contributor

d-perl commented Nov 29, 2024

with config (copied from docs...)

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

@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

╰─>$ 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.

@d-perl d-perl added the bug Something isn't working label Nov 29, 2024
@callumforrester
Copy link
Contributor

Hmm, not sure why it's missing the event, regardless we should probably add a timeout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants