From f0d417ce42f9fb214d975f2c9ec7d12f8b865ecb Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 30 Aug 2022 16:26:31 -0400 Subject: [PATCH] Drop status msg var deleting from ns --- piker/clearing/_ems.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/piker/clearing/_ems.py b/piker/clearing/_ems.py index 473a9e95..6a9025ff 100644 --- a/piker/clearing/_ems.py +++ b/piker/clearing/_ems.py @@ -617,8 +617,9 @@ async def translate_and_relay_brokerd_events( f'Received broker trade event:\n' f'{fmsg}' ) - match brokerd_msg: + status_msg: Optional[Status] = None + match brokerd_msg: # BrokerdPosition case { 'name': 'position', @@ -866,6 +867,7 @@ async def translate_and_relay_brokerd_events( }: log.error(f'Broker error:\n{fmsg}') # XXX: we presume the brokerd cancels its own order + continue # TOO FAST ``BrokerdStatus`` that arrives # before the ``BrokerdAck``. @@ -894,8 +896,8 @@ async def translate_and_relay_brokerd_events( raise ValueError(f'Brokerd message {brokerd_msg} is invalid') # XXX: ugh sometimes we don't access it? - if status_msg: - del status_msg + # if status_msg is not None: + # del status_msg # TODO: do we want this to keep things cleaned up? # it might require a special status from brokerd to affirm the