Sha256: 29bdc10e807708d624f89829f781e76ddc3455e9f8a23412bb4b19e8db4f65b0

Contents?: true

Size: 449 Bytes

Versions: 53

Compression:

Stored size: 449 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
        end
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
appsignal-1.0.2.beta.3 lib/appsignal/hooks/passenger.rb
appsignal-1.0.2.beta.2 lib/appsignal/hooks/passenger.rb
appsignal-1.0.2.beta.1 lib/appsignal/hooks/passenger.rb
appsignal-1.0.1 lib/appsignal/hooks/passenger.rb
appsignal-1.0.0 lib/appsignal/hooks/passenger.rb
appsignal-1.0.0.rc.1 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.14 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.13 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.12 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.11 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.10 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.9 lib/appsignal/hooks/passenger.rb
appsignal-0.12.rc.8 lib/appsignal/hooks/passenger.rb