Skip to content

Commit

Permalink
Move trimming to broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Sep 12, 2024
1 parent 5791054 commit e20f037
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/action_cable/subscription_adapter/solid_cable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def initialize(*)

def broadcast(channel, payload)
::SolidCable::Message.broadcast(channel, payload)

::SolidCable::TrimJob.perform_now if ::SolidCable.autotrim?
end

def subscribe(channel, callback, success_callback = nil)
Expand Down Expand Up @@ -68,8 +70,6 @@ def add_channel(channel, on_success)

def remove_channel(channel)
channels.delete(channel)

::SolidCable::TrimJob.perform_now if ::SolidCable.autotrim?
end

def invoke_callback(*)
Expand Down

0 comments on commit e20f037

Please sign in to comment.