mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:12:46 +08:00
DEV: Add optional support for running byebug when a PG Clash happens
Tracking down concurrency issues from backtraces and manual repros is a fraught process. Sometimes you've just got to get your hands dirty and do a live debug.
This commit is contained in:
parent
9f8a27a132
commit
a14a7f1cb8
|
@ -50,6 +50,11 @@ if ENV["TRACE_PG_CONNECTIONS"]
|
|||
|
||||
#{Thread.current&.backtrace&.join("\n")}
|
||||
STRING
|
||||
|
||||
if ENV["ON_PG_CLASH"] == "byebug"
|
||||
require "byebug"
|
||||
byebug
|
||||
end
|
||||
end
|
||||
@accessor_thread = Thread.current
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user