Always fire a "step/update message" on every fsp history update
parent
b75a3310fe
commit
761b823939
|
@ -127,8 +127,8 @@ async def fsp_compute(
|
||||||
# each respective field.
|
# each respective field.
|
||||||
fields = getattr(dst.array.dtype, 'fields', None).copy()
|
fields = getattr(dst.array.dtype, 'fields', None).copy()
|
||||||
fields.pop('index')
|
fields.pop('index')
|
||||||
# TODO: nptyping here!
|
history: Optional[np.ndarray] = None # TODO: nptyping here!
|
||||||
history: Optional[np.ndarray] = None
|
|
||||||
if fields and len(fields) > 1 and fields:
|
if fields and len(fields) > 1 and fields:
|
||||||
if not isinstance(history_output, dict):
|
if not isinstance(history_output, dict):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
@ -209,6 +209,12 @@ async def fsp_compute(
|
||||||
try:
|
try:
|
||||||
# rt stream
|
# rt stream
|
||||||
async with ctx.open_stream() as stream:
|
async with ctx.open_stream() as stream:
|
||||||
|
|
||||||
|
# always trigger UI refresh after history update,
|
||||||
|
# see ``piker.ui._fsp.FspAdmin.open_chain()`` and
|
||||||
|
# ``piker.ui._display.trigger_update()``.
|
||||||
|
await stream.send(index)
|
||||||
|
|
||||||
async for processed in out_stream:
|
async for processed in out_stream:
|
||||||
|
|
||||||
log.debug(f"{func_name}: {processed}")
|
log.debug(f"{func_name}: {processed}")
|
||||||
|
|
Loading…
Reference in New Issue