Sha256: e2da9adad734185b2705c472b4d866d5c68876d3ddacec450e8d683c68b565e3
Contents?: true
Size: 858 Bytes
Versions: 39
Compression:
Stored size: 858 Bytes
Contents
# typed: ignore # Copyright (c) 2015 Sqreen. All Rights Reserved. # Please refer to our terms for more information: https://www.sqreen.com/terms.html module Sqreen module WebServer module Passenger def self.active? Sqreen::Dependency.const_exist?('PhusionPassenger::App') end def forking? ::PhusionPassenger::App.options['spawn_method'] == 'smart' # otherwise direct end def preload_app? forking? # overarching spawn method behavior end def master? preload_app? # overarching spawn method behavior end def before_fork(&block); end def after_fork after_fork = lambda do |forked| yield if forked # forked == true in child end ::PhusionPassenger.on_event(:starting_worker_process, &after_fork) end end end end
Version data entries
39 entries across 39 versions & 1 rubygems