-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Solid Cable adapter for ActionCable
Switching the adapter is not expected to make any noticeable difference. The previous gem used was an interim solution and is now replaced by the new Solid Cable adapter shipping with Rails 8 by default.
- Loading branch information
Showing
7 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
default: &default | ||
adapter: solid_cable # OR postgresql OR redis | ||
|
||
### Config options for `solid_cable` | ||
connects_to: | ||
database: | ||
writing: cable | ||
polling_interval: 0.1.seconds | ||
message_retention: 1.day | ||
autotrim: true | ||
silence_polling: true | ||
|
||
### Config options for `redis` | ||
# url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> | ||
# channel_prefix: codeocean_production | ||
|
||
development: | ||
adapter: enhanced_postgresql | ||
<<: *default | ||
|
||
test: | ||
adapter: test | ||
|
||
staging: | ||
adapter: enhanced_postgresql | ||
<<: *default | ||
|
||
production: | ||
adapter: enhanced_postgresql # OR postgresql OR redis | ||
|
||
### Config options for `enhanced_postgresql` | ||
# payload_encryptor_secret: # Required. Will be the defined value or `Rails.application.secret_key_base` or `ENV["SECRET_KEY_BASE"]` | ||
# url: <%= ENV.fetch("DATABASE_URL") { "postgresql://localhost:5432/code_ocean_production" } %> | ||
# connection_pool_size: <%= ENV.fetch("RAILS_MAX_THREADS", 5).to_i %> # Only used in conjunction with `url` | ||
|
||
### Config options for `redis` | ||
# url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> | ||
# channel_prefix: code_ocean_production | ||
<<: *default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
db/migrate/20240912101506_drop_action_cable_large_payloads.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
class DropActionCableLargePayloads < ActiveRecord::Migration[7.2] | ||
def change | ||
# Drop the previously-used table for large payloads in ActionCable. | ||
# This table was implicitly created by the EnhancedPostgresql adapter. | ||
# Solid Cable used from now on manages the required schema separately. | ||
drop_table :action_cable_large_payloads, if_exists: true | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.