Module: ActiveRecordShards
- Defined in:
- lib/active_record_shards/sql_comments.rb,
lib/active_record_shards.rb,
lib/active_record_shards/model.rb,
lib/active_record_shards/tasks.rb,
lib/active_record_shards/migration.rb,
lib/active_record_shards/default_shard.rb,
lib/active_record_shards/shard_support.rb,
lib/active_record_shards/shard_selection.rb,
lib/active_record_shards/connection_switcher.rb,
lib/active_record_shards/configuration_parser.rb,
lib/active_record_shards/connection_switcher-5-1.rb,
lib/active_record_shards/connection_switcher-6-0.rb,
lib/active_record_shards/connection_switcher-6-1.rb,
lib/active_record_shards/connection_switcher-7-0.rb,
lib/active_record_shards/default_replica_patches.rb,
lib/active_record_shards/schema_dumper_extension.rb,
lib/active_record_shards/association_collection_connection_selection.rb
Overview
show which connection was picked to debug primary/replica slowness when both servers are the same
Defined Under Namespace
Modules: ActualMigrationExtension, AssociationCollectionConnectionSelection, ConfigurationParser, ConnectionSwitcher, DefaultReplicaPatches, DefaultShard, MigrationClassExtension, Model, SchemaDumperExtension, SqlComments, Tasks Classes: ShardSelection, ShardSupport
Class Attribute Summary collapse
-
.disable_replica_readonly_records ⇒ Object
Returns the value of attribute disable_replica_readonly_records.
Class Method Summary collapse
Class Attribute Details
.disable_replica_readonly_records ⇒ Object
Returns the value of attribute disable_replica_readonly_records.
17 18 19 |
# File 'lib/active_record_shards.rb', line 17 def disable_replica_readonly_records @disable_replica_readonly_records end |
Class Method Details
.app_env ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/active_record_shards.rb', line 20 def self.app_env @app_env ||= begin env = Rails.env if defined?(Rails.env) env ||= RAILS_ENV if Object.const_defined?(:RAILS_ENV) env ||= ENV['RAILS_ENV'] env ||= APP_ENV if Object.const_defined?(:APP_ENV) env ||= ENV['APP_ENV'] env || 'development' end end |