Created
January 25, 2023 20:41
-
-
Save gwbischof/b81acb957ac5688180ea3a530acffafb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nslsii | |
from bluesky_kafka import Publisher | |
import uuid | |
from tiled.client import from_profile | |
c = from_profile("ucal") | |
config = nslsii._read_bluesky_kafka_config_file(config_file_path="/etc/bluesky/kafka.yml") | |
pub = Publisher(topic="ucal.bluesky.runengine.documents", | |
bootstrap_servers=",".join(config['bootstrap_servers']), | |
key=str(uuid.uuid4()), | |
producer_config=config['runengine_producer_config'], | |
flush_on_stop_doc=True) | |
run = c[-1] | |
for name, doc in run.documents(): | |
pub(name, doc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment