Comments (9)
Possibly, wrap each supported plan with @baseline_decorator
and/or @monitor_during_decorator
and accept those devices & signals as arguments to the custom plan.
Is this the way to proceed with the standard bluesky.plans
?
from bluesky-queueserver.
I am not sure I fully understand the question. Typically there is a fixed set of baseline devices defined in startup code using either @baseline_decorator
or SupplementalData
(e.g. https://github.com/NSLS-II-SRX/profile_collection/blob/db111a44608e19aa08f46e444051c042ffe9e1d2/startup/95-baseline.py#L6) I think it is possible to write a plan that accepts a device name as a parameter and adds this device to a baseline or monitor for a wrapped plan if there is a use case for it (e.g. https://github.com/NSLS-II-SRX/profile_collection/blob/db111a44608e19aa08f46e444051c042ffe9e1d2/startup/62-flyscans.py#L422)
So far I considered baseline devices or monitors as part of bluesky functionality that is not controlled by the Queue Server.
@tacaswell Do you have any thoughts?
from bluesky-queueserver.
Thanks for the link. I'm stumped on how my startup code imports the RE
object so that it can call: RE.preprocessors.append(sd)
. The link does not show.
from bluesky-queueserver.
In my opinion, in production systems it is best not to rely on RE
created automatically by the Queue Server, but instead instantiate RE
in the startup code. Built-in RE
is definitely useful for demos or simple use cases, but defining RE in the startup code allows full customization.
If you run start-re-manager
with --keep-re
, the Queue Server will use RE
(and db
) instantiated in the startup code.
The traditional approach at NSLS-II is to call nsls-ii.configure_base
(https://github.com/NSLS-II/nslsii/blob/fd25bddfcabc3d9d3312c4e68dd7989cb9f36ba6/nslsii/__init__.py#L30), which instantiates and configures RE
(as it is done here https://github.com/NSLS-II-SRX/profile_collection/blob/db111a44608e19aa08f46e444051c042ffe9e1d2/startup/00-base.py#L57). The code was developed for IPython-based workflow and relies on user_ns
. The Queue Server patches IPython-style startup code to allow limited use of user_ns
, but I would avoid it if possible.
from bluesky-queueserver.
That is exactly the beast with which I am wrestling, the separation of our rich setup of a console or notebook experience from the startup of the queueserver which may not be able to undo all of our console planning. I'll proceed with the --keep-re
option and continue extracting the other UI features (such as BestEffortsCallback
and what commands are added to the user's interactive experience). I'm rather attached to our custom logging, implemented with features requested by our beam line users. Maybe that can be preserved, maybe not.
from bluesky-queueserver.
In startup scripts you can use conditional statements based on bluesky_queueserver.is_re_worker_active()
to enable/disable blocks of code when it is running in RE worker.
bluesky-queueserver/bluesky_queueserver/manager/profile_tools.py
Lines 319 to 343 in 613cfab
from bluesky-queueserver.
I think custom logging should work with the Queue Server. RE Worker should be able to run any reasonable code.
from bluesky-queueserver.
https://github.com/wright-group/bluesky-in-a-box/blob/main/re-manager/startup.py#L37-L50
This is what we do, just wrap all of our plans with baseline decorator
from bluesky-queueserver.
My questions are answered. Thanks.
from bluesky-queueserver.
Related Issues (20)
- 0MQ API: queue_item_execute HOT 1
- Move HTTP server to a separate repository HOT 1
- Streaming of `stdout` and `stderr` output from plans and Queue Server HOT 1
- Make API function importable from `bluesky_queueserver`
- Add an option to define optional `min` and `max` values for numbers in function annotations HOT 1
- Support for simplified plan descriptions (for the web).
- Revise the algorithm for generating simplified plan descriptions
- The function for generating nicely formatted parameter descriptions for GUI applications HOT 1
- Update the code to support aioredis `v2.0.0` API HOT 2
- using recv() in ReceiveConsoleOutputAsync and _socket.subscribe() HOT 4
- Databroker v1 interface used HOT 2
- Sub devices are not understood by the qserver HOT 1
- HIGH-PRIORITY: Tutorial missing basic info to get started HOT 15
- timestamp for each history item HOT 6
- Remove deprecated items in future releases
- Request: Supported method for relating queue item execution to runs HOT 1
- Interruption of jsonrpc communication results in watchdog timer infinitely triggering HOT 3
- Provide authorisation/security information to kafka producer. HOT 3
- Issue while testing of the server with IPython-based worker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluesky-queueserver.