remove ohlc debug logs
This commit is contained in:
@@ -164,7 +164,7 @@ def update_ohlc(prev: NativeOHLC, period: timedelta, time: datetime, price: Opti
|
|||||||
returns an ordered list of OHLC's that have been created/modified by the new time/price
|
returns an ordered list of OHLC's that have been created/modified by the new time/price
|
||||||
if price is None, then bars are advanced based on the time but no new price is added to the series.
|
if price is None, then bars are advanced based on the time but no new price is added to the series.
|
||||||
"""
|
"""
|
||||||
log.debug(f'\tupdating {prev} with {minutely(time)} {price}')
|
# log.debug(f'\tupdating {prev} with {minutely(time)} {price}')
|
||||||
cur = prev
|
cur = prev
|
||||||
if time < cur.start:
|
if time < cur.start:
|
||||||
# data corruption. just shut down
|
# data corruption. just shut down
|
||||||
@@ -177,13 +177,13 @@ def update_ohlc(prev: NativeOHLC, period: timedelta, time: datetime, price: Opti
|
|||||||
break
|
break
|
||||||
result.append(cur)
|
result.append(cur)
|
||||||
cur = NativeOHLC(end, None, None, None, cur.close)
|
cur = NativeOHLC(end, None, None, None, cur.close)
|
||||||
log.debug(f'\ttime advancements: {result}')
|
# log.debug(f'\ttime advancements: {result}')
|
||||||
# if we are setting a price, update the current bar
|
# if we are setting a price, update the current bar
|
||||||
if price is not None:
|
if price is not None:
|
||||||
cur.update(price)
|
cur.update(price)
|
||||||
result.append(cur)
|
result.append(cur)
|
||||||
log.debug(f'\tappended current bar: {cur.ohlc}')
|
# log.debug(f'\tappended current bar: {cur.ohlc}')
|
||||||
log.debug(f'\tupdate result: {result}')
|
# log.debug(f'\tupdate result: {result}')
|
||||||
return result
|
return result
|
||||||
|
|
||||||
class OHLCKey (NamedTuple):
|
class OHLCKey (NamedTuple):
|
||||||
@@ -435,7 +435,7 @@ class OHLCRepository:
|
|||||||
return found
|
return found
|
||||||
|
|
||||||
def flush(self) -> None:
|
def flush(self) -> None:
|
||||||
log.debug(f'flushing {len(self.dirty_chunks)} chunks')
|
# log.debug(f'flushing {len(self.dirty_chunks)} chunks')
|
||||||
for chunk in self.dirty_chunks:
|
for chunk in self.dirty_chunks:
|
||||||
chunk.save()
|
chunk.save()
|
||||||
self.dirty_chunks.clear()
|
self.dirty_chunks.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user