Sha256: 7980e96c72cdaa874a3c5ff6bd34124006d7fbf0496cf2c65c9aa968cbac6efa

Contents?: true

Size: 472 Bytes

Versions: 109

Compression:

Stored size: 472 Bytes

Contents

# frozen_string_literal: true

module ActionCable
  module Server
    class Worker
      module ActiveRecordConnectionManagement
        extend ActiveSupport::Concern

        included do
          if defined?(ActiveRecord::Base)
            set_callback :work, :around, :with_database_connections
          end
        end

        def with_database_connections
          connection.logger.tag(ActiveRecord::Base.logger) { yield }
        end
      end
    end
  end
end

Version data entries

109 entries across 109 versions & 9 rubygems

Version Path
actioncable-6.1.4.2 lib/action_cable/server/worker/active_record_connection_management.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/actioncable-6.1.4.1/lib/action_cable/server/worker/active_record_connection_management.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/actioncable-6.1.4.1/lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.4.1 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.0.4.1 lib/action_cable/server/worker/active_record_connection_management.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/actioncable-6.1.4/lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.4 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.0.4 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-5.2.6 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.0.3.7 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.3.2 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-5.2.4.6 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.3.1 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.0.3.6 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-5.2.5 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.3 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.2.1 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.0.3.5 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-5.2.4.5 lib/action_cable/server/worker/active_record_connection_management.rb
actioncable-6.1.2 lib/action_cable/server/worker/active_record_connection_management.rb