From 5f45404efb80e47e3cac36003252fcf1469cd35a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 5 Nov 2021 15:45:56 -0400 Subject: [PATCH] Stopgap: don't rerun Context.started() fsp calc task --- piker/fsp/_engine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/piker/fsp/_engine.py b/piker/fsp/_engine.py index ebdd498d..bbaa713b 100644 --- a/piker/fsp/_engine.py +++ b/piker/fsp/_engine.py @@ -145,10 +145,13 @@ async def fsp_compute( profiler(f'{func_name} pushed history') profiler.finish() + # TODO: UGH, what is the right way to do something like this? + if not ctx._started_called: + await ctx.started(index) + # setup a respawn handle with trio.CancelScope() as cs: tracker = TaskTracker(trio.Event(), cs) - await ctx.started(index) task_status.started((tracker, index)) profiler(f'{func_name} yield last index')