module PumaDoctor
Constants
- VERSION
Attributes
frequency[RW]
log_file[RW]
logger[R]
memory_threshold[RW]
pid_file[RW]
puma_pid[RW]
puma_pid_file[RW]
Public Instance Methods
default_options()
click to toggle source
# File lib/puma_doctor.rb, line 28 def default_options { memory_threshold: self.memory_threshold, puma_pid_file: self.puma_pid_file, puma_pid: self.puma_pid } end
start(options = {})
click to toggle source
# File lib/puma_doctor.rb, line 18 def start(options = {}) @logger = ::PumaDoctor::Logger.new(log_file: options[:log_file] || self.log_file, log_level: options[:log_level]) @logger.log_start doctor = Doctor.new(default_options.merge(options).merge(logger: @logger)) loop do doctor.examine sleep(options[:frequency] || self.frequency) end end