-
Notifications
You must be signed in to change notification settings - Fork 7
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
WIP numtracker integration #828
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demo purposes only, this shouldn't be merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demo purposes only, this shouldn't be merged
def file_writing() -> MsgGenerator[None]: | ||
detectors = ["d1", "d2", "d3"] | ||
provider = get_path_provider() | ||
|
||
@bpp.run_decorator() | ||
def inner() -> MsgGenerator[None]: | ||
yield from bps.sleep(0.1) | ||
for detector in detectors: | ||
path_info = provider(detector) | ||
print(f"{detector} -> {path_info}") | ||
yield from bps.sleep(0.1) | ||
|
||
yield from inner() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demo purposes only, this shouldn't be merged
_hook_run_engine_and_path_provider() | ||
|
||
|
||
# TODO: Make the path provider ourselves and inject it into dodal, leaving BL modules to define their own offline default | ||
def _hook_run_engine_and_path_provider() -> None: | ||
path_provider = get_path_provider() | ||
run_engine = context().run_engine | ||
|
||
if isinstance(path_provider, StartDocumentBasedPathProvider): | ||
run_engine.subscribe(path_provider.update_run, "start") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed and done in a separate PR
@@ -5,10 +5,15 @@ | |||
|
|||
from bluesky_stomp.messaging import StompClient | |||
from bluesky_stomp.models import Broker, DestinationBase, MessageTopic | |||
from dodal.common.beamlines.beamline_utils import ( | |||
StartDocumentBasedPathProvider, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed and done in a separate PR
No description provided.