Sha256: 455408b710249fe783d8fb01839e2ab4710d7b1675644bfbd56deb53fb6d8f96

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

# frozen_string_literal: true

module FiberedMysql2
  module HashConfigOverride
    # Override the reaping_frequency method to return nil so that the connection pool does not reap connections when in fibered mode.
    def reaping_frequency
      nil
    end
  end
end

if ActiveRecord.gem_version >= "6.1"
  ActiveRecord::DatabaseConfigurations::HashConfig.prepend(FiberedMysql2::HashConfigOverride)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fibered_mysql2-1.1.0 lib/fibered_mysql2/hash_config_override.rb
fibered_mysql2-1.0.1 lib/fibered_mysql2/hash_config_override.rb
fibered_mysql2-0.2.1 lib/fibered_mysql2/hash_config_override.rb