DEV: Initialize pg access log mutex in non-sidekiq processes

Followup to be3e4ab3f5
This commit is contained in:
David Taylor 2020-02-18 14:20:28 +00:00
parent 9441362c72
commit 2bdd1275ce
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434
1 changed files with 2 additions and 2 deletions

View File

@ -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