Skip to content

Commit

Permalink
Move executor
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Dec 6, 2024
1 parent ebcfbb4 commit 52fed65
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/action_cable/subscription_adapter/solid_cable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def initialize(event_loop)

@thread = Thread.new do
Thread.current.abort_on_exception = true
listen
Rails.application.executor.wrap { listen }
end
end

Expand Down Expand Up @@ -96,12 +96,10 @@ def channels
end

def broadcast_messages
Rails.application.executor.wrap do
::SolidCable::Message.broadcastable(channels, last_id).
each do |message|
broadcast(message.channel, message.payload)
self.last_id = message.id
end
::SolidCable::Message.broadcastable(channels, last_id).
each do |message|
broadcast(message.channel, message.payload)
self.last_id = message.id
end
end

Expand Down

0 comments on commit 52fed65

Please sign in to comment.