From ebcfbb40c2f71daec97e6ec8a9dfad2999a594b1 Mon Sep 17 00:00:00 2001 From: Nick Pezza Date: Fri, 6 Dec 2024 10:14:24 -0500 Subject: [PATCH] Swap executor for reloader to fix dev server hanging on code changes --- lib/action_cable/subscription_adapter/solid_cable.rb | 2 +- test/config_stubs.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/action_cable/subscription_adapter/solid_cable.rb b/lib/action_cable/subscription_adapter/solid_cable.rb index 149d411..65944aa 100644 --- a/lib/action_cable/subscription_adapter/solid_cable.rb +++ b/lib/action_cable/subscription_adapter/solid_cable.rb @@ -96,7 +96,7 @@ def channels end def broadcast_messages - Rails.application.reloader.wrap do + Rails.application.executor.wrap do ::SolidCable::Message.broadcastable(channels, last_id). each do |message| broadcast(message.channel, message.payload) diff --git a/test/config_stubs.rb b/test/config_stubs.rb index a1558b0..f6e78af 100644 --- a/test/config_stubs.rb +++ b/test/config_stubs.rb @@ -13,11 +13,11 @@ def config_for(_file) @config end - def reloader - @reloader ||= ReloaderStub.new + def executor + @executor ||= ExectorStub.new end - class ReloaderStub + class ExectorStub def wrap(&block) block.call end