aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/subscription_adapter
Commit message (Collapse)AuthorAgeFilesLines
* feat: support channel_prefix in pg subscription adapterVladimir Dementyev2019-02-141-0/+2
|
* ActionCable: add id option to redis adapter configIlia Kasianenko2018-09-051-1/+2
|
* Clarify api docs of ActionCable::SubscriptionAdapter::Testbogdanvlviv2018-08-231-1/+1
| | | | Remove extra `:nodoc:` comment since private methods doesn't require that.
* Add Action Cable test adapterVladimir Dementyev2018-08-191-0/+40
|
* 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.
* | Removed deprected evented redis adapterRafael Mendonça França2017-10-231-89/+0
| |
* | [Action Cable] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | | | | | This basically reverts f851e1f705f26d8f92f0fc1b265b20bc389d23cb
* | redis-rb 4.0 supportJeremy Daer2017-10-082-3/+3
| | | | | | | | | | | | | | | | * Use `gem 'redis', '~> 4.0'` for new app Gemfiles * Loosen Action Cable redis-rb dep to `>= 3.3, < 5` * Bump redis-namespace for looser Redis version dep * Avoid using the underlying `redis.client` directly * Use `Redis.new` instead of `Redis.connect`
* | Capitalize RedisJon Moss2017-08-171-1/+1
| | | | | | | | [ci skip]
* | Use frozen string literal in actioncable/Kir Shatrov2017-07-238-0/+16
| |
* | [Fix #28751] Hash stream long stream identifiers when using Postgres adapterpalkan2017-07-061-3/+8
| |
* | [Action Cable] require => require_relativeAkira Matsuda2017-07-011-1/+1
| |
* | Allows for other common redis options to be in cable.yml, by defaultMarc Ignacio2017-06-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds RedisAdapterTest::AlternateConfiguration to account for a relatively common alternative setup, as it’s used as the first example in the [Redis rubygem](https://github.com/redis/redis-rb#getting-started) - Supplies original RedisAdapterTest with more complete redis:// url format by adding a ‘userinfo’ (blank user), so that it resembles the alternate configuration - Supplies original EventedRedisAdapterTest with more complete redis:// url as well - Adds before_script to start redis-server with password as a daemon and with explicit defaults copied from the default redis.conf (Instead of using Travis' default init/upstart scripts for `redis` service)
* | Use mattr_accessor default: option throughout the projectGenadi Samokovarov2017-06-032-3/+3
|/
* Deprecate the EventedRedis subscription adapterMatthew Draper2017-02-231-0/+6
| | | | | Unlike Faye support, it seems a bit too documented to remove without warning. So, here's a warning.
* Add channel_prefix support to ActionCable redis/evented_redis adapters.Chad Ingram2017-01-173-0/+30
|
* Prevent race condition when launching EventMachine reactorMatthew Draper2016-11-301-2/+2
| | | | | | | reactor_running? will be true just after the thread enters EventMachine.run; reactor_thread only gets set after the internal initialize_event_machine method has been called, the C extension is set up, and it is entering its run loop.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+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-064-17/+17
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add guard to broadcast.mmmpa2016-05-261-1/+5
|
* Log if redis connection is in stale/failed state.Vipul A M2016-04-211-0/+4
|
* Evented Redis adapter: log reconnect failures as errors, not just infoJeremy Daer2016-03-171-1/+1
| | | | [ci skip]
* Support faye-websocket + EventMachine as an optionMatthew Draper2016-03-023-11/+18
|
* Merge pull request #23916 from ↵Jeremy Daer2016-02-261-2/+6
|\ | | | | | | | | lifo/same-redis-connection-for-subscription-and-broadcast Always use redis_connector to create redis connections
| * Use redis_connector to create redis connections for both subscriptions and ↵Pratik Naik2016-02-261-2/+6
| | | | | | | | broadcasts
* | Full Action Cable documentation read throughJon Moss2016-02-171-2/+2
|/ | | | | | | | | This PR checks all active Action Cable documentation for typos and other fixes. It aims to make sure that when Rails 5 is released, that the Action Cable docs are up to snuff with the other documentation included with Rails. [ci skip]
* Allow for non-standard redis connectorsDavid Heinemeier Hansson2016-02-042-3/+15
|
* Switch the default redis adapter to a single-stream modelMatthew Draper2016-02-012-30/+193
| | | | | | This new adapter does get a little more intimate with the redis-rb gem's implementation than I would like, but it's the least bad of the approaches I've come up with.
* Synchronize the lazy setters in ServerMatthew Draper2016-01-304-8/+31
| | | | They're all at risk of races on the first requests.
* Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-303-4/+20
|
* Revert "Eliminate the EventMachine dependency"David Heinemeier Hansson2016-01-273-20/+4
|
* Using a hacked faye-websocket, drop EventMachineMatthew Draper2016-01-243-4/+20
|
* Allow subscription adapters to be shut downMatthew Draper2016-01-244-14/+40
|
* Add Async and Inline adaptersMatthew Draper2016-01-242-0/+44
| | | | | Just like their ActiveJob equivalents, these only work within the current process.
* Normalize on no arguments for the success callbackMatthew Draper2016-01-241-1/+1
|
* Split internal subscriber tracking from Postgres adapterMatthew Draper2016-01-242-23/+66
|
* Use the correct reference to the redis connectionBrit Gardner2016-01-221-1/+1
| | | | | Fixes #23193 This was throwing `There was an exception - NameError(undefined local variable or method `hi_redis_conn' for #<ActionCable::SubscriptionAdapter::Redis:0x007fb1449e2b70>)` on unsubscribe.
* Merge pull request #22950 from maclover7/adapterize-storage-actioncableMatthew Draper2016-01-202-8/+6
| | | | Adapterize storage for ActionCable
* Fix code review commentsJon Moss2016-01-182-30/+19
| | | | | | | - 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-183-0/+170