From 1b405ab4fe4fcfb442369ae0bd6f3e74603457d6 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 23 Jan 2019 22:35:59 -0500 Subject: [PATCH] s/tickers/topics --- tractor/msg.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tractor/msg.py b/tractor/msg.py index 9c0bd2c..53c36fd 100644 --- a/tractor/msg.py +++ b/tractor/msg.py @@ -68,21 +68,21 @@ def modify_subs(topics2ctxs, topics, ctx): log.info(f"{ctx.chan.uid} changed subscription to {topics}") # update map from each symbol to requesting client's chan - for ticker in topics: - topics2ctxs.setdefault(ticker, set()).add(ctx) + for topic in topics: + topics2ctxs.setdefault(topic, set()).add(ctx) # remove any existing symbol subscriptions if symbol is not # found in ``symbols`` # TODO: this can likely be factored out into the pub-sub api - for ticker in filter( + for topic in filter( lambda topic: topic not in topics, topics2ctxs.copy() ): - ctx_set = topics2ctxs.get(ticker) + ctx_set = topics2ctxs.get(topic) ctx_set.discard(ctx) if not ctx_set: # pop empty sets which will trigger bg quoter task termination - topics2ctxs.pop(ticker) + topics2ctxs.pop(topic) def pub(