class ActiveSupport::ExecutionWrapper

def self.wrap(source: "application.active_support")

Perform the work in the supplied block as an execution.
def self.wrap(source: "application.active_support")
  return yield if active?
  instance = run!
  begin
    yield
  rescue Exception => error
    error_reporter&.report(error, handled: false, source: source)
    raise
  ensure
    instance.complete!
  end
end