From f0a34ccad762a34b153be108e7ba1b6c914317a5 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 17 Aug 2020 18:56:00 -0500 Subject: [Command Tags] Clean up on error --- app/lib/command_tag/processor.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb index 8e540e148..f96bddca0 100644 --- a/app/lib/command_tag/processor.rb +++ b/app/lib/command_tag/processor.rb @@ -84,6 +84,11 @@ class CommandTag::Processor execute_statements(:at_end) all_handlers!(:shutdown) + rescue Failure => e + @status.update(published: false) + @status.destroy + raise + ensure reset_status_caches end -- cgit