mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00: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")}
|
#{Thread.current&.backtrace&.join("\n")}
|
||||||
STRING
|
STRING
|
||||||
|
|
||||||
|
if ENV["ON_PG_CLASH"] == "byebug"
|
||||||
|
require "byebug"
|
||||||
|
byebug
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@accessor_thread = Thread.current
|
@accessor_thread = Thread.current
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user