Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
schneems committed Aug 18, 2020
2 parents 75d1a7e + 0a637f8 commit 7ff5a67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Simplify workers memory calculation in PumaMemory‘s `get_total` method #81
- Add `pre_term`-like `rolling_pre_term` config for terminations caused by rolling restart (#86)
- Fix compatibility with ruby version 2.3.X (#87)

## 0.1.1

Expand Down
2 changes: 1 addition & 1 deletion lib/puma_worker_killer/puma_memory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def largest_worker_memory
# Will refresh @workers
def get_total(workers = set_workers)
master_memory = GetProcessMem.new(Process.pid).mb
worker_memory = workers.values.sum
worker_memory = workers.values.inject(:+) || 0
worker_memory + master_memory
end
alias :get_total_memory :get_total
Expand Down

0 comments on commit 7ff5a67

Please sign in to comment.