Skip to content

Commit d65f5fc

Browse files
committed
update
1 parent ce9bc6b commit d65f5fc

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

lib/plausible/repo.ex

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff 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
4517
end

0 commit comments

Comments
 (0)