class AnyCable::Rails::Middlewares::Executor
See guides.rubyonrails.org/v5.2.0/threading_and_code_execution.html#framework-behavior<br>Executor runs Rails executor for each call
def call(method, message, metadata)
def call(method, message, metadata) if ::Rails.respond_to?(:error) executor.wrap do sid = metadata["sid"] ::Rails.error.record(context: {method: method, payload: message.to_h, sid: sid}) do yield end end else executor.wrap { yield } end end
def initialize(executor)
def initialize(executor) @executor = executor end