Drop shm: ShmArray` to `stream_quotes()` endpoint
parent
23aa7eb31c
commit
832e4c97d2
|
@ -386,7 +386,6 @@ async def stream_quotes(
|
||||||
|
|
||||||
send_chan: trio.abc.SendChannel,
|
send_chan: trio.abc.SendChannel,
|
||||||
symbols: List[str],
|
symbols: List[str],
|
||||||
shm: ShmArray,
|
|
||||||
feed_is_live: trio.Event,
|
feed_is_live: trio.Event,
|
||||||
loglevel: str = None,
|
loglevel: str = None,
|
||||||
|
|
||||||
|
|
|
@ -517,11 +517,11 @@ class Client:
|
||||||
contract, ticker, details = await self.get_sym_details(symbol)
|
contract, ticker, details = await self.get_sym_details(symbol)
|
||||||
|
|
||||||
# ensure a last price gets filled in before we deliver quote
|
# ensure a last price gets filled in before we deliver quote
|
||||||
for _ in range(2):
|
for _ in range(1):
|
||||||
if isnan(ticker.last):
|
if isnan(ticker.last):
|
||||||
|
await asyncio.sleep(0.1)
|
||||||
log.warning(f'Quote for {symbol} timed out: market is closed?')
|
log.warning(f'Quote for {symbol} timed out: market is closed?')
|
||||||
ticker = await ticker.updateEvent
|
ticker = await ticker.updateEvent
|
||||||
await asyncio.sleep(0.1)
|
|
||||||
else:
|
else:
|
||||||
log.info(f'Got first quote for {symbol}')
|
log.info(f'Got first quote for {symbol}')
|
||||||
break
|
break
|
||||||
|
@ -1201,12 +1201,13 @@ async def backfill_bars(
|
||||||
task_status: TaskStatus[trio.CancelScope] = trio.TASK_STATUS_IGNORED,
|
task_status: TaskStatus[trio.CancelScope] = trio.TASK_STATUS_IGNORED,
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Fill historical bars into shared mem / storage afap.
|
'''
|
||||||
|
Fill historical bars into shared mem / storage afap.
|
||||||
|
|
||||||
TODO: avoid pacing constraints:
|
TODO: avoid pacing constraints:
|
||||||
https://github.com/pikers/piker/issues/128
|
https://github.com/pikers/piker/issues/128
|
||||||
|
|
||||||
"""
|
'''
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == 'Windows':
|
||||||
log.warning(
|
log.warning(
|
||||||
'Decreasing history query count to 4 since, windows...')
|
'Decreasing history query count to 4 since, windows...')
|
||||||
|
@ -1411,7 +1412,6 @@ async def stream_quotes(
|
||||||
|
|
||||||
send_chan: trio.abc.SendChannel,
|
send_chan: trio.abc.SendChannel,
|
||||||
symbols: list[str],
|
symbols: list[str],
|
||||||
shm: ShmArray,
|
|
||||||
feed_is_live: trio.Event,
|
feed_is_live: trio.Event,
|
||||||
loglevel: str = None,
|
loglevel: str = None,
|
||||||
|
|
||||||
|
|
|
@ -406,7 +406,6 @@ async def stream_quotes(
|
||||||
|
|
||||||
send_chan: trio.abc.SendChannel,
|
send_chan: trio.abc.SendChannel,
|
||||||
symbols: List[str],
|
symbols: List[str],
|
||||||
shm: ShmArray,
|
|
||||||
feed_is_live: trio.Event,
|
feed_is_live: trio.Event,
|
||||||
loglevel: str = None,
|
loglevel: str = None,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue