Skip to content

Commit

Permalink
Added timestamp to puma logs and timeout for worker shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
denis.o committed Feb 19, 2020
1 parent 477b112 commit 1c7da25
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 1c7da25

Please sign in to comment.