Handle logging against IPC stream vs. throttled channel on overruns
parent
47d0c81a2d
commit
8e390278f5
|
@ -253,11 +253,17 @@ async def sample_and_broadcast(
|
|||
try:
|
||||
stream.send_nowait((sym, quote))
|
||||
except trio.WouldBlock:
|
||||
ctx = getattr(sream, '_ctx', None)
|
||||
if ctx:
|
||||
log.warning(
|
||||
f'Feed overrun {bus.brokername} ->'
|
||||
f'{stream._ctx.channel.uid} !!!'
|
||||
f'{ctx.channel.uid} !!!'
|
||||
)
|
||||
else:
|
||||
log.warning(
|
||||
f'Feed overrun {bus.brokername} -> '
|
||||
f'feed @ {tick_throttle} Hz'
|
||||
)
|
||||
|
||||
else:
|
||||
await stream.send({sym: quote})
|
||||
|
||||
|
|
Loading…
Reference in New Issue