Sha256: d6b87977dee3fe91ab019445a862f9deceeb522e379a1ecb2cb432e3cff46a7f
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
PumaAutoTune.hooks(:ram) do |auto| auto.wrap(:reap_cycle) do |block| Proc.new do |resource, master, workers| ends_at = Time.now - PumaAutoTune.reap_duration while Time.now < ends_at sleep 1 block.call(*auto.args) end end end auto.wrap(:remove_worker) do |block| Proc.new do |resource, master, workers| resource.reset PumaAutoTune.max_workers = workers.size - 1 block.call(*auto.args) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puma_auto_tune-0.0.1 | lib/puma_auto_tune/defaults/ram/wrappers.rb |