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