Skip to content

Commit

Permalink
Merge pull request #626 from denisoster/cherry-pick-3147f86
Browse files Browse the repository at this point in the history
[1.10] Added timestamp to puma logs and timeout for worker shutdown
  • Loading branch information
dmitry-sinina authored Feb 19, 2020
2 parents 477b112 + 1c7da25 commit 905d406
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/puma_production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@

preload_app!

# Set the timeout for worker shutdown
worker_shutdown_timeout(120)

# Set Timestamp
log_formatter do |str|
"[#{Process.pid}] #{Time.now}: #{str}"
end

before_fork do
ActiveRecord::Base.connection.disconnect!
Cdr::Base.connection.disconnect!
Expand Down

0 comments on commit 905d406

Please sign in to comment.