Not all ActionCable broadcasts broadcasting
I have an app that successfully has ActionCable implemented and working in production on Heroku.
We recently added an additional broadcast, but this wont broadcast no matter what I try.
Each user has their own channel and the new request looks like this:
ActionCable.server.broadcast("touch_point_channel:#{u&.touch_point_stream_id}", @soft_skill_evaluation.attributes.merge(author: author_name, type: "new_ess_completed"))
When testing locally I can see that ActionCable does broadcast as expected.
I have been banging my head against this issue for awhile and cannot understand why one broadcast works on production, but the other does not.
I am also unsure, from a logging standpoint, on where to see in the logs that broadcasts were sent in production.
I'm trying to figure out a similar problem... I don't have an answer yet but I was able to get a bit more information in development by opening the turbo-rails gem (gem open turbo-rails
) and adding some puts debugging to the method I'm trying to figure out (broadcasts_refreshes
).
You could do something similar in production to add some targeted logging to the method that isn't working?