mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 16:57:16 +08:00
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:

committed by
Loïc Guitaut

parent
3ca7c5e438
commit
a589b48f9a
@ -97,7 +97,7 @@ class Service::Runner
|
||||
},
|
||||
on_exceptions: {
|
||||
condition: ->(*exceptions) do
|
||||
next unless failure_for?("result.try.default")
|
||||
next unless result["result.try.default"]&.exception
|
||||
next true if exceptions.empty?
|
||||
exceptions.any? { result["result.try.default"].exception.is_a?(_1) }
|
||||
end,
|
||||
|
Reference in New Issue
Block a user