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

WIP numtracker integration #828

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

callumforrester
Copy link
Contributor

No description provided.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Comment on lines +14 to +26
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()
Copy link
Contributor Author

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

Comment on lines +115 to +124
_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")
Copy link
Contributor Author

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,
Copy link
Contributor Author

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

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