Acquire symbol data with daemon; push as first response
parent
5a9c079c10
commit
fcaeeae618
|
@ -325,13 +325,19 @@ async def start_quoter(
|
||||||
log.warn(f"Retrieving smoke quote for {queue.peer}")
|
log.warn(f"Retrieving smoke quote for {queue.peer}")
|
||||||
quotes = await get_quotes(tickers)
|
quotes = await get_quotes(tickers)
|
||||||
# pop any tickers that aren't returned in the first quote
|
# pop any tickers that aren't returned in the first quote
|
||||||
tickers = set(tickers) - set(quotes)
|
valid_tickers = set(tickers) - set(quotes)
|
||||||
for ticker in tickers:
|
for ticker in valid_tickers:
|
||||||
log.warn(
|
log.warn(
|
||||||
f"Symbol `{ticker}` not found by broker `{brokermod.name}`"
|
f"Symbol `{ticker}` not found by broker `{brokermod.name}`"
|
||||||
)
|
)
|
||||||
tickers2qs.pop(ticker, None)
|
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
|
# pop any tickers that return "empty" quotes
|
||||||
payload = {}
|
payload = {}
|
||||||
for symbol, quote in quotes.items():
|
for symbol, quote in quotes.items():
|
||||||
|
|
Loading…
Reference in New Issue