From 6770a965a69bb25381604d95bc9815e0e6ea1f05 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 8 Jun 2021 18:15:31 +0000 Subject: [PATCH] history: add support for cancelled state Signed-off-by: Kamil Trzcinski --- moonraker/components/history.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/moonraker/components/history.py b/moonraker/components/history.py index 97477ce..3b08612 100644 --- a/moonraker/components/history.py +++ b/moonraker/components/history.py @@ -188,7 +188,11 @@ class History: elif self.current_job is not None: if new_state == "complete": self.finish_job("completed", new_ps) - if new_state == "standby": + elif new_state == "cancelled": + self.finish_job("cancelled", new_ps) + elif new_state == "standby": + # Backward compatibility with + # `CLEAR_PAUSE/SDCARD_RESET_FILE` workflow self.finish_job("cancelled", self.print_stats) elif new_state == "error": self.finish_job("error", new_ps)