Sha256: 8f7541b5835b01fcc732965a465d36e111f20faa257e82c29609d3c99ac38096

Contents?: true

Size: 463 Bytes

Versions: 5

Compression:

Stored size: 463 Bytes

Contents

module Appsignal
  class Hooks
    class PassengerHook < Appsignal::Hooks::Hook
      register :passenger

      def dependencies_present?
        defined?(::PhusionPassenger)
      end

      def install
        ::PhusionPassenger.on_event(:starting_worker_process) do |_forked|
          Appsignal.forked
        end

        ::PhusionPassenger.on_event(:stopping_worker_process) do
          Appsignal.stop("passenger")
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
appsignal-2.1.2 lib/appsignal/hooks/passenger.rb
appsignal-2.1.1 lib/appsignal/hooks/passenger.rb
appsignal-2.1.1.beta.1 lib/appsignal/hooks/passenger.rb
appsignal-2.1.0 lib/appsignal/hooks/passenger.rb
appsignal-2.1.0.beta.1 lib/appsignal/hooks/passenger.rb