Sha256: 6710d26a8518fe60892f51eeadc723210b73b727c7233346629069a13ff3a678
Contents?: true
Size: 602 Bytes
Versions: 1
Compression:
Stored size: 602 Bytes
Contents
require 'get_process_mem' module PumaWorkerKiller extend self attr_accessor :ram, :frequency, :percent_usage self.ram = 512 # mb self.frequency = 10 # seconds self.percent_usage = 0.99 # percent of RAM to use def config yield self end def reaper(ram = self.ram, percent = self.percent_usage) Reaper.new(ram * percent_usage) end def start(frequency = self.frequency, reaper = self.reaper) AutoReap.new(frequency, reaper).start end end require 'puma_worker_killer/reaper' require 'puma_worker_killer/auto_reap' require 'puma_worker_killer/version'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puma_worker_killer-0.0.1 | lib/puma_worker_killer.rb |