Trigger kraken sample increment after startup

basic_alerts
Tyler Goodlet 2021-01-07 12:17:10 -05:00
parent 282cc85ba0
commit dba8457be9
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
# piker: trading gear for hackers # piker: trading gear for hackers
# Copyright (C) 2018-present Tyler Goodlet (in stewardship of piker0) # Copyright (C) Tyler Goodlet (in stewardship for piker0)
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
@ -34,6 +34,7 @@ import tractor
from ._util import resproc, SymbolNotFound, BrokerError from ._util import resproc, SymbolNotFound, BrokerError
from ..log import get_logger, get_console_log from ..log import get_logger, get_console_log
from ..data import ( from ..data import (
_buffer,
# iterticks, # iterticks,
attach_shm_array, attach_shm_array,
get_shm_token, get_shm_token,
@ -382,6 +383,9 @@ async def stream_quotes(
# packetize as {topic: quote} # packetize as {topic: quote}
yield {topic: quote} yield {topic: quote}
# tell incrementer task it can start
_buffer.shm_incrementing(shm_token['shm_name']).set()
# keep start of last interval for volume tracking # keep start of last interval for volume tracking
last_interval_start = ohlc_last.etime last_interval_start = ohlc_last.etime