Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuration for action cable for postgreSQL?

How will the configuration file, config/cable.yml look like for a postgreSQL adapter?

like image 972
Vedant Agarwala Avatar asked Sep 19 '16 11:09

Vedant Agarwala


People also ask

How do you test an action cable?

Testing Action Cable To test this connection class, we can use connect method to simulate a client server connection and then test the state of connection is as expected. The connection object is available in the test.

What is an action cable?

1 What is Action Cable? Action Cable seamlessly integrates WebSockets with the rest of your Rails application. It allows for real-time features to be written in Ruby in the same style and form as the rest of your Rails application, while still being performant and scalable.


1 Answers

This is working for me:

# config/cable.yml
production:
  adapter: postgresql

development:
  adapter: postgresql

test:
  adapter: postgresql

The postgresql adapter uses the pg notify command. Keep in mind that the message body must be smaller than 8000 bytes.

like image 100
David Avatar answered Oct 25 '22 13:10

David