David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 8 years ago on ActionCable on Production :

No, `max_conns` is the maximum number of file descriptors that can be open where as `max-persistent-conns` is the maximum number of persistent connections you're referring to. Depending on your configuration, you could have a dedicated web socket server balanced by an HAPROXY server. This would allow for much greater number of connections while all serving at the same endpoint.


David Kimura PRO said over 8 years ago on ActionCable on Production :

With concurrency in mind, `max_conn` could probably be left at the default of 1024. However, the default for `max_persistent_conns` is 100.


David Kimura PRO said over 8 years ago on Importing and Exporting CSV Data :

Have a look at this branch compare. (https://github.com/driftingrub...

You basically will need to temporarily create a file to store it and pass the path to ActiveJob. While this is currently working on local filestore, it can also work with S3 or fog.


David Kimura PRO said over 8 years ago on Importing and Exporting CSV Data :

The * is a splat operator. So, take the following example.

[2] pry(main)> fields
=> ["first_name", "last_name"]
[3] pry(main)> User.first.attributes.values_at(fields)
User Load (0.5ms)SELECT`users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 1
=> [nil]
[4] pry(main)> User.first.attributes.values_at(*fields)
User Load (0.5ms)SELECT`users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 1
=> ["System", "Administrator"]

http://blog.honeybadger.io/rub...

The ! at the end of find_or_create_by will raise an exception on validation errors.


David Kimura PRO said over 8 years ago on ActionCable - Part 1 - Configuration and Basics :

Keep in mind that if you are using ActionCable on production, it does not currently work with Apache + Passenger. Instead use Nginx + Passenger.

https://www.phusionpassenger.com/library/config/apache/action_cable_integration/