File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -14,32 +14,4 @@ defmodule Plausible.Repo do
1414 import Ecto.Query , only: [ from: 1 , from: 2 ]
1515 end
1616 end
17-
18- # CI-specific instrumentation to track connection checkouts
19- if Mix . env ( ) in [ :test , :ce_test ] do
20- def checkout ( fun , opts \\ [ ] ) do
21- if System . get_env ( "CI" ) do
22- caller = self ( )
23- { :current_stacktrace , stacktrace } = Process . info ( caller , :current_stacktrace )
24-
25- # Get the calling function (skip this function and the caller)
26- caller_function =
27- stacktrace
28- |> Enum . drop ( 2 )
29- |> Enum . take ( 3 )
30- |> Enum . map ( fn { mod , fun , arity , _ } -> "#{ inspect ( mod ) } .#{ fun } /#{ arity } " end )
31- |> Enum . join ( " <- " )
32-
33- IO . puts ( "=== DB CHECKOUT by #{ inspect ( caller ) } : #{ caller_function } ===" )
34- end
35-
36- result = super ( fun , opts )
37-
38- if System . get_env ( "CI" ) do
39- IO . puts ( "=== DB CHECKOUT COMPLETE by #{ inspect ( self ( ) ) } ===" )
40- end
41-
42- result
43- end
44- end
4517end
You can’t perform that action at this time.
0 commit comments