DEV: Handle nil backtraces in pg access logs

This commit is contained in:
David Taylor 2020-02-18 15:45:44 +00:00
parent 2bdd1275ce
commit ea49ca7ef5
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434

View File

@ -44,11 +44,11 @@ if ENV["TRACE_PG_CONNECTIONS"]
#{@accessor_thread} was using the connection. Backtrace: #{@accessor_thread} was using the connection. Backtrace:
#{@accessor_thread.backtrace.join("\n")} #{@accessor_thread&.backtrace&.join("\n")}
#{Thread.current} is now attempting to use the connection. Backtrace: #{Thread.current} is now attempting to use the connection. Backtrace:
#{Thread.current.backtrace.join("\n")} #{Thread.current&.backtrace&.join("\n")}
STRING STRING
end end
@accessor_thread = Thread.current @accessor_thread = Thread.current