projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Application, dependencies: prepare for finch
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index f4d22373aa0da529e608555b0827c6f828d685d3..34eaed18193d47be3c61a9310ec66c08ff5741cb 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-61,6
+61,10
@@
defmodule Pleroma.Application do
adapter = Application.get_env(:tesla, :adapter)
adapter = Application.get_env(:tesla, :adapter)
+ if adapter == Tesla.Adapter.Finch do
+ Finch.start_link(name: MyFinch)
+ end
+
if adapter == Tesla.Adapter.Gun do
if version = Pleroma.OTPVersion.version() do
[major, minor] =
if adapter == Tesla.Adapter.Gun do
if version = Pleroma.OTPVersion.version() do
[major, minor] =
@@
-102,7
+106,7
@@
defmodule Pleroma.Application do
] ++
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
] ++
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
-
chat_child(cha
t_enabled?()) ++
+
shout_child(shou
t_enabled?()) ++
[Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
[Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
@@
-216,7
+220,7
@@
defmodule Pleroma.Application do
type: :worker
}
type: :worker
}
- defp
chat_enabled?, do: Config.get([:cha
t, :enabled])
+ defp
shout_enabled?, do: Config.get([:shou
t, :enabled])
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
@@
-237,14
+241,14
@@
defmodule Pleroma.Application do
]
end
]
end
- defp
cha
t_child(true) do
+ defp
shou
t_child(true) do
[
[
- Pleroma.Web.
ChatChannel.Cha
tChannelState,
+ Pleroma.Web.
ShoutChannel.Shou
tChannelState,
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
- defp
cha
t_child(_), do: []
+ defp
shou
t_child(_), do: []
defp task_children(:test) do
[
defp task_children(:test) do
[