From 5e6ebca1e0da6971b1f2b5736f6b6345bafb2177 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 16 Nov 2022 13:32:26 -0500 Subject: [PATCH] Rework `_FeedsBus` subscriptions mgmt using `set` Allows using `set` ops for subscription management and guarantees no duplicates per `brokerd` actor. New API is simpler for dynamic pause/resume changes per `Feed`: - `_FeedsBus.add_subs()`, `.get_subs()`, `.remove_subs()` all accept multi-sub `set` inputs. - `Feed.pause()` / `.resume()` encapsulates management of *only* sending a msg on each unique underlying IPC msg stream. Use new api in sampler task. --- piker/data/feed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piker/data/feed.py b/piker/data/feed.py index 93b85764..f291c512 100644 --- a/piker/data/feed.py +++ b/piker/data/feed.py @@ -1106,7 +1106,7 @@ async def allocate_persistent_feed( # a small streaming machine around the remote feed which can then # do the normal work of sampling and writing shm buffers # (depending on if we want sampling done on the far end or not?) - msg = init_msg[symstr.lower()] + msg = init_msg[symstr] # the broker-specific fully qualified symbol name, # but ensure it is lower-cased for external use.