From 2bdd1275ce97dab9b0b4d113e6925f36b2d89ccf Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 18 Feb 2020 14:20:28 +0000 Subject: [PATCH] DEV: Initialize pg access log mutex in non-sidekiq processes Followup to be3e4ab3f55afb1f89bdd702f069b44a8bcef8e7 --- config/initializers/000-trace_pg_connections.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/000-trace_pg_connections.rb b/config/initializers/000-trace_pg_connections.rb index c652f64985d..bdf74316cc4 100644 --- a/config/initializers/000-trace_pg_connections.rb +++ b/config/initializers/000-trace_pg_connections.rb @@ -24,9 +24,9 @@ if ENV["TRACE_PG_CONNECTIONS"] FileUtils.mkdir_p(TRACE_DIR) @trace_filename = "#{TRACE_DIR}/#{Process.pid}_#{self.object_id}.txt" trace File.new(@trace_filename, "w") - @access_log_mutex = Mutex.new - @accessor_thread = nil end + @access_log_mutex = Mutex.new + @accessor_thread = nil end def close