DEV: Display better output when inspecting service steps

This patch aims to improve the steps inspector output:
- The service class name is displayed at the top.
- Next to each step is displayed the time it took to run said step.
- Steps that didn’t run are hidden.
- `#inspect` automatically outputs the error when it is present.
This commit is contained in:
Loïc Guitaut
2024-12-03 18:15:54 +01:00
committed by Loïc Guitaut
parent 3ca7c5e438
commit a589b48f9a
8 changed files with 167 additions and 137 deletions

View File

@ -450,7 +450,7 @@ after_initialize do
)
if creator.failure?
Rails.logger.warn "[discourse-automation] Chat message failed to send:\n#{creator.inspect_steps.inspect}\n#{creator.inspect_steps.error}"
Rails.logger.warn "[discourse-automation] Chat message failed to send:\n#{creator.inspect_steps}"
end
end
end