mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 09:03:45 +08:00
DEV: Initialize pg access log mutex in non-sidekiq processes
Followup to be3e4ab3f5
This commit is contained in:
parent
9441362c72
commit
2bdd1275ce
|
@ -24,10 +24,10 @@ if ENV["TRACE_PG_CONNECTIONS"]
|
||||||
FileUtils.mkdir_p(TRACE_DIR)
|
FileUtils.mkdir_p(TRACE_DIR)
|
||||||
@trace_filename = "#{TRACE_DIR}/#{Process.pid}_#{self.object_id}.txt"
|
@trace_filename = "#{TRACE_DIR}/#{Process.pid}_#{self.object_id}.txt"
|
||||||
trace File.new(@trace_filename, "w")
|
trace File.new(@trace_filename, "w")
|
||||||
|
end
|
||||||
@access_log_mutex = Mutex.new
|
@access_log_mutex = Mutex.new
|
||||||
@accessor_thread = nil
|
@accessor_thread = nil
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def close
|
def close
|
||||||
super.tap do
|
super.tap do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user