mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 16:33:38 +08:00
DEV: Handle nil backtraces in pg access logs
This commit is contained in:
parent
2bdd1275ce
commit
ea49ca7ef5
|
@ -44,11 +44,11 @@ if ENV["TRACE_PG_CONNECTIONS"]
|
|||
|
||||
#{@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.backtrace.join("\n")}
|
||||
#{Thread.current&.backtrace&.join("\n")}
|
||||
STRING
|
||||
end
|
||||
@accessor_thread = Thread.current
|
||||
|
|
Loading…
Reference in New Issue
Block a user