Skip to content

API for system info (status) streaming from RE Manager#54

Merged
dmgav merged 11 commits intobluesky:mainfrom
dmgav:status-stream
Dec 3, 2025
Merged

API for system info (status) streaming from RE Manager#54
dmgav merged 11 commits intobluesky:mainfrom
dmgav:status-stream

Conversation

@dmgav
Copy link
Contributor

@dmgav dmgav commented Dec 1, 2025

Description

Added REManager.system_info_monitor class to support System Info streaming by RE Manager (see bluesky/bluesky-queueserver#339). The class supports streaming over 0MQ (directly by RE Manager) or a WebSocket (via HTTP Server). For example, the following code may be used to receive messages by subscribing to the WebSocket:

from bluesky_queueserver_api.http import REManagerAPI

RM = REManagerAPI()
RM.system_info_monitor.enable()
while True:
    try:
        msg = RM.system_info_monitor.next_msg()
        print(f"msg={msg}")
    except RM.RequestTimeoutError:
        pass

The asyncio version:

import asyncio
from bluesky_queueserver_api.http.aio import REManagerAPI

async def func():
    RM = REManagerAPI()
    RM.system_info_monitor.enable()
    while True:
        try:
            msg = await RM.system_info_monitor.next_msg(timeout=0.1)
            print(f"msg={msg}")
        except RM.RequestTimeoutError:
            pass

asyncio.run(func())

Summary of Changes for Release Notes

Added

  • Support for streaming of RE Manager System Info (including RE Manager status) using REManager.system_info_monitor.

How Has This Been Tested?

@dmgav dmgav marked this pull request as ready for review December 3, 2025 17:34
@dmgav dmgav merged commit 63813bf into bluesky:main Dec 3, 2025
13 of 21 checks passed
@dmgav dmgav deleted the status-stream branch December 3, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant