projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra diagnostic tasks in
[akkoma]
/
lib
/
pleroma
/
utils.ex
diff --git
a/lib/pleroma/utils.ex
b/lib/pleroma/utils.ex
index a446d3ae6f32a80d73a3780fe69e073f52aaccce..bd9939c9fa9fe9b8f0625052c728ea69a5829dcf 100644
(file)
--- a/
lib/pleroma/utils.ex
+++ b/
lib/pleroma/utils.ex
@@
-14,10
+14,23
@@
defmodule Pleroma.Utils do
@repo_timeout Pleroma.Config.get([Pleroma.Repo, :timeout], 15_000)
def compile_dir(dir) when is_binary(dir) do
@repo_timeout Pleroma.Config.get([Pleroma.Repo, :timeout], 15_000)
def compile_dir(dir) when is_binary(dir) do
+ dir
+ |> elixir_files()
+ |> Kernel.ParallelCompiler.compile()
+ end
+
+ defp elixir_files(dir) when is_binary(dir) do
dir
|> File.ls!()
|> Enum.map(&Path.join(dir, &1))
dir
|> File.ls!()
|> Enum.map(&Path.join(dir, &1))
- |> Kernel.ParallelCompiler.compile()
+ |> Enum.flat_map(fn path ->
+ if File.dir?(path) do
+ elixir_files(path)
+ else
+ [path]
+ end
+ end)
+ |> Enum.filter(fn path -> String.ends_with?(path, ".ex") end)
end
@doc """
end
@doc """