aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/subscription_adapter/postgresql.rb
Commit message (Collapse)AuthorAgeFilesLines
* feat: support channel_prefix in pg subscription adapterVladimir Dementyev2019-02-141-0/+2
|
* Merge pull request #27577 from maclover7/jm-fix-27547Rafael Mendonça França2018-06-081-8/+24
|\ | | | | | | Action Cable owns database connection, not Active Record
| * Action Cable owns database connection, not Active RecordJon Moss2017-03-251-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the database connection used in Action Cable's PostgreSQL adapter was "owned" by `ActiveRecord::Base.connection_pool`. This meant that if, for example, `#clear_reloadable_connections!` was called on the pool, Active Record would "steal" the database connection from Action Cable, and would cause all sorts of issues. This became evident during file reloads; despite Action Cable trying its hardest to return its borrowed database connection to Active Record via `@pubsub.shutdown`, Active Record calls `#clear_reloadable_connections!` on the connection pool, and due to the order of callbacks, Active Record's callback was being executed first. This meant that if you tried to rerender a view after a file was reloaded, you would have to wait through Active Record's timeout and such. Now, Action Cable takes direct ownership of the database connection it uses. It removes the connection from the pool to avoid the situation described above. Action Cable also makes sure to call `#disconnect!` on the connection when appropriate, to match the previous behavior of Active Record. [ Jon Moss & Matthew Draper]
* | PostgreSQL: Allow pg-1.0 gem to be used with ActiveRecordLars Kanis2018-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | pg-1.0.0 is just released and most Gemfiles don't restrict it's version. But the version is checked when connecting to the database, which leads to the following error: Gem::LoadError: can't activate pg (~> 0.18), already activated pg-1.0.0 See also this pg issue: https://bitbucket.org/ged/ruby-pg/issues/270/pg-100-x64-mingw32-rails-server-not-start Preparation for pg-1.0 was done in commit f28a331023fab, but the pg version constraint was not yet relaxed.
* | Use frozen string literal in actioncable/Kir Shatrov2017-07-231-0/+2
| |
* | [Fix #28751] Hash stream long stream identifiers when using Postgres adapterpalkan2017-07-061-3/+8
| |
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* | Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|/
* copy-edits an exception messageXavier Noria2016-08-071-1/+1
| | | | | | | | | | | | | | Inserted spaces in the name of Rails components. Since I was on it, also used PostgreSQL instead of Postgres because albeit Postgres is an accepted alias, PostgreSQL is the official name and the actual name of the adapter. See https://wiki.postgresql.org/wiki/ProjectName with regard to PostgreSQL vs Postgres.
* applies new string literal convention in actioncable/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Support faye-websocket + EventMachine as an optionMatthew Draper2016-03-021-4/+5
|
* Synchronize the lazy setters in ServerMatthew Draper2016-01-301-1/+6
| | | | They're all at risk of races on the first requests.
* Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-301-2/+2
|
* Revert "Eliminate the EventMachine dependency"David Heinemeier Hansson2016-01-271-2/+2
|
* Using a hacked faye-websocket, drop EventMachineMatthew Draper2016-01-241-2/+2
|
* Allow subscription adapters to be shut downMatthew Draper2016-01-241-14/+27
|
* Split internal subscriber tracking from Postgres adapterMatthew Draper2016-01-241-23/+13
|
* Merge pull request #22950 from maclover7/adapterize-storage-actioncableMatthew Draper2016-01-201-1/+0
| | | | Adapterize storage for ActionCable
* Fix code review commentsJon Moss2016-01-181-6/+2
| | | | | | | - adapter -> pubsub (re)rename internally - Change variable names to match method names - Add EventMachine `~> 1.0` as a runtime dependency of ActionCable - Refactor dependency loading for adapters
* Small PostgreSQL adapter refactors / cleanupJon Moss2016-01-181-14/+16
| | | | | - Escape the channel name when subscribing in PG - Refactor popping the queue to make it easier to read
* ActionCable::StorageAdapter ==> ActionCable::SubscriptionAdapterJon Moss2016-01-181-0/+101