Skip to content

Commit

Permalink
fix: anycable dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jan 3, 2025
1 parent c546e6c commit f397cfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions anycable-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "anycable-rails-core", AnyCable::Rails::VERSION
spec.add_dependency "anycable"

spec.add_development_dependency "ammeter", "~> 1.1"
spec.add_development_dependency "bundler", ">= 1.10"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/anycablemaster.gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
source "https://rubygems.org"

gem "rails", "~> 7.0"
gem "rails", "~> 8.0"
gem "rspec-rails"
gem "anycable", git: "https://github.com/anycable/anycable.git", branch: "master"
gem "anycable", git: "https://github.com/anycable/anycable-rb.git", branch: "main"
gem "sqlite3"

gemspec path: "..", name: "anycable-rails"
5 changes: 3 additions & 2 deletions lib/anycable/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ class Railtie < ::Rails::Railtie # :nodoc:

initializer "anycable.verify_pool_sizes" do
next if AnyCable.config.disable_rpc_pool_size_warning?
# Skip if non-gRPC server is used
next unless AnyCable.config.respond_to?(:rpc_pool_size)

# Log current db vs. gRPC pool sizes
AnyCable.configure_server do
# Skip if non-gRPC server is used
next unless AnyCable.config.respond_to?(:rpc_pool_size)

ActiveSupport.on_load(:active_record) do
db_pool_size = ::ActiveRecord::Base.connection_pool.size
rpc_pool_size = AnyCable.config.rpc_pool_size
Expand Down

0 comments on commit f397cfb

Please sign in to comment.