diff --git a/tractor/_context.py b/tractor/_context.py index 167aad6..4a20c2b 100644 --- a/tractor/_context.py +++ b/tractor/_context.py @@ -1703,15 +1703,28 @@ class Context: # TODO: expose as mod func instead! structfmt = pretty_struct.Struct.pformat if self._in_overrun: - log.warning( - f'Queueing OVERRUN msg on caller task:\n\n' - + report: str = ( f'{flow_body}' - f'{structfmt(msg)}\n' ) + over_q: deque = self._overflow_q self._overflow_q.append(msg) + if len(over_q) == over_q.maxlen: + report = ( + 'FAILED to queue OVERRUN msg, OVERAN the OVERRUN QUEUE !!\n\n' + + report + ) + # log.error(report) + log.debug(report) + + else: + report = ( + 'Queueing OVERRUN msg on caller task:\n\n' + + report + ) + log.debug(report) + # XXX NOTE XXX # overrun is the ONLY case where returning early is fine! return False diff --git a/tractor/trionics/_broadcast.py b/tractor/trionics/_broadcast.py index 977b682..154b037 100644 --- a/tractor/trionics/_broadcast.py +++ b/tractor/trionics/_broadcast.py @@ -382,7 +382,7 @@ class BroadcastReceiver(ReceiveChannel): # likely it makes sense to unwind back to the # underlying? # import tractor - # await tractor.breakpoint() + # await tractor.pause() log.warning( f'Only one sub left for {self}?\n' 'We can probably unwind from breceiver?'