From a180815ab3500fa3635fd32e52d771db072b546d Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:20:50 +1100 Subject: [PATCH] testing to see if this fixes failure in ci --- codex/utils/asyncstatemachine.nim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/codex/utils/asyncstatemachine.nim b/codex/utils/asyncstatemachine.nim index 2d02110d..3f15af31 100644 --- a/codex/utils/asyncstatemachine.nim +++ b/codex/utils/asyncstatemachine.nim @@ -90,13 +90,13 @@ proc start*(machine: Machine, initialState: State) = machine.scheduled = newAsyncQueue[Event]() machine.started = true - machine.scheduler() - .track(machine) - .cancelled(proc() = trace("machine.scheduler cancelled, swallowing")) - .catch((err: ref CatchableError) => - error("Error in scheduler", error = err.msg) - ) - machine.schedule(Event.transition(machine.state, initialState)) + try: + discard machine.scheduler().track(machine) + machine.schedule(Event.transition(machine.state, initialState)) + except CancelledError as e: + discard + except CatchableError as e: + error("Error in scheduler", error = e.msg) proc stop*(machine: Machine) {.async.} = if not machine.started: