Pass through rate arg to `poll_tickers`

kivy_mainline_and_py3.8
Tyler Goodlet 2018-03-21 17:26:30 -04:00
parent 456e86990f
commit 1ea784558c
1 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ Launch with ``piker watch <watchlist name>``.
"""
from itertools import chain
from types import ModuleType
from functools import partial
import trio
from kivy.uix.boxlayout import BoxLayout
@ -383,7 +384,7 @@ async def run_kivy(root, nursery):
nursery.cancel_scope.cancel() # cancel all other tasks that may be running
async def _async_main(name, tickers, brokermod):
async def _async_main(name, tickers, brokermod, rate):
'''Launch kivy app + all other related tasks.
This is started with cli command `piker watch`.
@ -395,7 +396,9 @@ async def _async_main(name, tickers, brokermod):
sd = await client.symbols(tickers)
nursery.start_soon(
poll_tickers, client, brokermod.quoter, tickers, queue)
partial(poll_tickers, client, brokermod.quoter, tickers, queue,
rate=rate)
)
# get first quotes response
pkts = await queue.get()