我尝试像这样配置cable.yml :适配器: postgresql测试:适配器: postgresql生产:适配器: postgresql:?channel_prefix:?
发布于 2020-07-01 23:59:10
如果您可以使用像redis https://redis.io/这样的缓存服务来获得更好的性能,这会更好,因为对于每个始终打开的套接字,您将使用通知系统大致命中db。
但是,您可以按照以下方式配置yml文件:
development:
adapter: postgresql
test:
adapter: postgresql
staging:
adapter: postgresql
production:
adapter: postgresql
url: production_db_url
channel_prefix: 请参阅这个特定部分的文档,其中提到了生产中的redis,至少与我前面提到的原因相同:https://edgeguides.rubyonrails.org/action_cable_overview.html#subscription-adapter
https://stackoverflow.com/questions/62578155
复制相似问题