From 1c7da257fd8a165fe0ad50a5eede67afa9b834fc Mon Sep 17 00:00:00 2001 From: "denis.o" Date: Wed, 19 Feb 2020 13:05:34 +0200 Subject: [PATCH] Added timestamp to puma logs and timeout for worker shutdown --- config/puma_production.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/puma_production.rb b/config/puma_production.rb index 2dbc051b5..8efd249ed 100644 --- a/config/puma_production.rb +++ b/config/puma_production.rb @@ -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!