Parameterize duration, pprint msg
parent
3924c66bd0
commit
26d6e10ad7
|
@ -49,10 +49,13 @@ class Struct(
|
|||
hasattr(sys, 'ps1')
|
||||
# TODO: check if we're in pdb
|
||||
):
|
||||
return f'Struct({pformat(self.to_dict())})'
|
||||
return self.pformat()
|
||||
|
||||
return super().__repr__()
|
||||
|
||||
def pformat(self) -> str:
|
||||
return f'Struct({pformat(self.to_dict())})'
|
||||
|
||||
def copy(
|
||||
self,
|
||||
update: Optional[dict] = None,
|
||||
|
|
|
@ -37,8 +37,8 @@ _dbus_uid: Optional[str] = ''
|
|||
|
||||
|
||||
async def notify_from_ems_status_msg(
|
||||
uuid: str,
|
||||
msg: Status,
|
||||
duration: int = 3000,
|
||||
is_subproc: bool = False,
|
||||
|
||||
) -> None:
|
||||
|
@ -84,12 +84,12 @@ async def notify_from_ems_status_msg(
|
|||
[
|
||||
'notify-send',
|
||||
'-u', 'normal',
|
||||
'-t', '1616',
|
||||
'-t', f'{duration}',
|
||||
'piker',
|
||||
|
||||
# TODO: add in standard fill/exec info that maybe we
|
||||
# pack in a broker independent way?
|
||||
f"'{msg.resp}: {msg.req.price}'",
|
||||
f"'{msg.pformat()}'",
|
||||
],
|
||||
)
|
||||
log.runtime(result)
|
||||
|
|
Loading…
Reference in New Issue