chore: Debug action cable

This commit is contained in:
Sojan 2022-08-03 16:51:32 +02:00
parent 63b1013b45
commit 6a1dbf4aa9

View file

@ -2,8 +2,12 @@ class ActionCableBroadcastJob < ApplicationJob
queue_as :default queue_as :default
def perform(members, event_name, data) def perform(members, event_name, data)
logger.info "Processing ActionCableBroadcastJob"
logger.info "Available Channels: #{Redis.new.pubsub("channels", "*action_cable:*")}"
members.each do |member| members.each do |member|
ActionCable.server.broadcast(member, { event: event_name, data: data }) logger.info "Broadcasting to member: #{member}"
result = ActionCable.server.broadcast(member, { event: event_name, data: data })
logger.info "Broadcast result: #{result}"
end end
end end
end end