Sha256: f19ce2c8d6178d2d7591270c1c385332f35895da9680f23e5c587af84e911147

Contents?: true

Size: 529 Bytes

Versions: 206

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

module Appsignal
  class Hooks
    # @api private
    class PumaHook < Appsignal::Hooks::Hook
      register :puma

      def dependencies_present?
        defined?(::Puma)
      end

      def install
        return unless defined?(::Puma::Cluster)

        # For clustered mode with multiple workers
        ::Puma::Cluster.send(:prepend, Module.new do
          def stop_workers
            Appsignal.stop("puma cluster")
            super
          end
        end)
      end
    end
  end
end

Version data entries

206 entries across 206 versions & 1 rubygems

Version Path
appsignal-3.9.2-java lib/appsignal/hooks/puma.rb
appsignal-3.9.2 lib/appsignal/hooks/puma.rb
appsignal-3.9.1-java lib/appsignal/hooks/puma.rb
appsignal-3.9.1 lib/appsignal/hooks/puma.rb
appsignal-3.9.0-java lib/appsignal/hooks/puma.rb
appsignal-3.9.0 lib/appsignal/hooks/puma.rb
appsignal-3.8.1-java lib/appsignal/hooks/puma.rb
appsignal-3.8.1 lib/appsignal/hooks/puma.rb
appsignal-3.8.0-java lib/appsignal/hooks/puma.rb
appsignal-3.8.0 lib/appsignal/hooks/puma.rb
appsignal-3.7.6-java lib/appsignal/hooks/puma.rb
appsignal-3.7.6 lib/appsignal/hooks/puma.rb
appsignal-3.7.2-java lib/appsignal/hooks/puma.rb
appsignal-3.7.2 lib/appsignal/hooks/puma.rb
appsignal-3.7.1-java lib/appsignal/hooks/puma.rb
appsignal-3.7.1 lib/appsignal/hooks/puma.rb
appsignal-3.7.0-java lib/appsignal/hooks/puma.rb
appsignal-3.7.0 lib/appsignal/hooks/puma.rb
appsignal-3.6.5-java lib/appsignal/hooks/puma.rb
appsignal-3.6.5 lib/appsignal/hooks/puma.rb