From 2ec384f295f7a754c4a950a8b256603c835ec191 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:26:33 +1100 Subject: [PATCH] Update logging for state transition Logs state transitioning from. Useful for transitioning to SaleErrored state. --- codex/utils/asyncstatemachine.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex/utils/asyncstatemachine.nim b/codex/utils/asyncstatemachine.nim index 27d09b64..512617ee 100644 --- a/codex/utils/asyncstatemachine.nim +++ b/codex/utils/asyncstatemachine.nim @@ -73,8 +73,9 @@ proc scheduler(machine: Machine) {.async.} = if next =? event(machine.state): if not running.isNil and not running.finished: await running.cancelAndWait() + let fromState = if machine.state.isNil: "" else: $machine.state machine.state = next - debug "enter state", state = machine.state + debug "enter state", state = machine.state, fromState running = machine.run(machine.state) running .track(machine)