|
72 | 72 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
73 | 73 |
|
74 | 74 | if ENV['RAILS_LOG_TO_STDOUT'].present?
|
75 |
| - logger = ActiveSupport::Logger.new($stdout) |
| 75 | + logger = ActiveSupport::Logger.new($stdout) |
76 | 76 | logger.formatter = config.log_formatter
|
77 |
| - config.logger = ActiveSupport::TaggedLogging.new(logger) |
| 77 | + config.logger = ActiveSupport::TaggedLogging.new(logger) |
78 | 78 | end
|
79 | 79 |
|
80 | 80 | # Do not dump schema after migrations.
|
81 | 81 | config.active_record.dump_schema_after_migration = false
|
82 | 82 |
|
83 |
| - # Inserts middleware to perform automatic connection switching. |
84 |
| - # The `database_selector` hash is used to pass options to the DatabaseSelector |
85 |
| - # middleware. The `delay` is used to determine how long to wait after a write |
86 |
| - # to send a subsequent read to the primary. |
87 |
| - # |
88 |
| - # The `database_resolver` class is used by the middleware to determine which |
89 |
| - # database is appropriate to use based on the time delay. |
90 |
| - # |
91 |
| - # The `database_resolver_context` class is used by the middleware to set |
92 |
| - # timestamps for the last write to the primary. The resolver uses the context |
93 |
| - # class timestamps to determine how long to wait before reading from the |
94 |
| - # replica. |
95 |
| - # |
96 |
| - # By default Rails will store a last write timestamp in the session. The |
97 |
| - # DatabaseSelector middleware is designed as such you can define your own |
98 |
| - # strategy for connection switching and pass that into the middleware through |
99 |
| - # these configuration options. |
100 |
| - # config.active_record.database_selector = { delay: 2.seconds } |
101 |
| - # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver |
102 |
| - # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session |
103 |
| - |
104 | 83 | config.token_hash_rounds = 10
|
105 | 84 |
|
106 | 85 | config.transcode_cache_expiry = -> { 3.days.ago }
|
|
0 commit comments