Import client for now until we make a proper shim

kivy_mainline_and_py3.8
Tyler Goodlet 2018-02-12 10:35:54 -05:00
parent f4fd35fa21
commit 9f3efd2a6a
1 changed files with 9 additions and 6 deletions

View File

@ -6,13 +6,17 @@ import json
from os import path
import trio
from async_generator import asynccontextmanager
from ..brokers import questrade
from ..calc import percent_change
@asynccontextmanager
async def get_client() -> None:
"""Shim client factory.
"""
yield None
get_client = questrade.get_client
# @asynccontextmanager
# async def get_client() -> None:
# """Shim client factory.
# """
# yield None
async def poll_tickers(
@ -23,7 +27,6 @@ async def poll_tickers(
content = quotes_file.read()
pkts = content.split('--') # simulate 2 separate quote packets
# import pdb; pdb.set_trace()
payloads = [json.loads(pkt)['quotes'] for pkt in pkts]
for payload in cycle(payloads):