Update logging for state transition

Logs state transitioning from. Useful for transitioning to SaleErrored state.
This commit is contained in:
Eric 2023-12-05 15:26:33 +11:00
parent fd2721ce97
commit 2ec384f295
No known key found for this signature in database

View File

@ -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: "<none>" 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)