From 6a1dbf4aa9a0bcd8edd1476b963087ea3f7bcd8d Mon Sep 17 00:00:00 2001 From: Sojan Date: Wed, 3 Aug 2022 16:51:32 +0200 Subject: [PATCH] chore: Debug action cable --- app/jobs/action_cable_broadcast_job.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/jobs/action_cable_broadcast_job.rb b/app/jobs/action_cable_broadcast_job.rb index aedae2c46..6e27eb891 100644 --- a/app/jobs/action_cable_broadcast_job.rb +++ b/app/jobs/action_cable_broadcast_job.rb @@ -2,8 +2,12 @@ class ActionCableBroadcastJob < ApplicationJob queue_as :default def perform(members, event_name, data) + logger.info "Processing ActionCableBroadcastJob" + logger.info "Available Channels: #{Redis.new.pubsub("channels", "*action_cable:*")}" 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