Acquire symbol data with daemon; push as first response

kivy_mainline_and_py3.8
Tyler Goodlet 2018-05-08 15:39:57 -04:00
parent 5a9c079c10
commit fcaeeae618
1 changed files with 8 additions and 2 deletions

View File

@ -325,13 +325,19 @@ async def start_quoter(
log.warn(f"Retrieving smoke quote for {queue.peer}")
quotes = await get_quotes(tickers)
# pop any tickers that aren't returned in the first quote
tickers = set(tickers) - set(quotes)
for ticker in tickers:
valid_tickers = set(tickers) - set(quotes)
for ticker in valid_tickers:
log.warn(
f"Symbol `{ticker}` not found by broker `{brokermod.name}`"
)
tickers2qs.pop(ticker, None)
# first respond with symbol data for all tickers (allows
# clients to receive broker specific setup info)
sd = await client.symbol_data(tickers)
assert sd, "No symbol data could be found?"
await queue.put(sd)
# pop any tickers that return "empty" quotes
payload = {}
for symbol, quote in quotes.items():