From 1ea784558cc48914fa69b8ac10b6091da303af53 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 21 Mar 2018 17:26:30 -0400 Subject: [PATCH] Pass through rate arg to `poll_tickers` --- piker/ui/watchlist.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/piker/ui/watchlist.py b/piker/ui/watchlist.py index a447fd87..4aa3b268 100644 --- a/piker/ui/watchlist.py +++ b/piker/ui/watchlist.py @@ -7,6 +7,7 @@ Launch with ``piker watch ``. """ 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()