Ask A Question

Notifications

You’re not receiving notifications from this thread.

Not all ActionCable broadcasts broadcasting

RJ McCollam asked in Rails

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.

Reply

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?

Reply

Have you found something useful to solve it?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.