Add ZMQ API message for requesting the current state of the RunEngine Metadata#343
Add ZMQ API message for requesting the current state of the RunEngine Metadata#343dmgav merged 24 commits intobluesky:mainfrom
Conversation
…y-queueserver into add-request-re-md
…sequent requests, and that non-string types are retrieveable
|
Another point worth investigation is how the server behaves if RE metadata dictionary is not serializable. Ideally the request should fail with meaningful error message. |
|
I am not sure if there's a better way to check for serializability other than just trying to serialize? |
|
This is what I did for the return value of an arbitrary function, which can return arbitrary result: I believe the message is pickled when it is passed between processes, so the results of JSON serialization are not used. |
…into add-request-re-md
|
@dmgav I don't think the test failures are related to the changes here. Is this OK to merge or is there something else you wanted me to address first? |
|
We need to handle the situations when there is no RE in the environment, RE does not have To check that RE was removed successfully it may be useful to check |
|
Since we are adding a new API, we should also update the API documentation, may be put the API description after the description of |
Description
The Run Engine metadata is often used to store important state about the currently running experiment. For example, we use it to store the current cycle and proposal number as well as the current transient scan ID. Beamlines have requested having the ability to see this information from an interface to QueueServer (specifically queue-monitor). The new API message allows for asking for the current state of the metadata provided the environment is open.
Motivation and Context
Beamlines wish to see the value of certain metadata keys in the UI the use for queueserver (eg. transient scan id, proposal number etc). Subsequent PRs can add the ability to use this message in the python and http apis, and eventually queuemonitor and other queueserver clients.
Summary of Changes for Release Notes
Added
re_metadatamessage to the RE manager and RE worker classes.qserver re metadataCLI command.Changed
How Has This Been Tested?
Manually tested:
And added in unit tests.