X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fapplication.ex;h=34eaed18193d47be3c61a9310ec66c08ff5741cb;hb=abb62dd8863a3fde0d329e2d529bca8346e9b177;hp=f4d22373aa0da529e608555b0827c6f828d685d3;hpb=f6d2bd738d6cf4c495ba8fcd311ebf4705cf4343;p=akkoma diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index f4d22373a..34eaed181 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -61,6 +61,10 @@ defmodule Pleroma.Application do 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] = @@ -102,7 +106,7 @@ defmodule Pleroma.Application do ] ++ task_children(@mix_env) ++ dont_run_in_test(@mix_env) ++ - chat_child(chat_enabled?()) ++ + shout_child(shout_enabled?()) ++ [Pleroma.Gopher.Server] # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html @@ -216,7 +220,7 @@ defmodule Pleroma.Application do type: :worker } - defp chat_enabled?, do: Config.get([:chat, :enabled]) + defp shout_enabled?, do: Config.get([:shout, :enabled]) defp dont_run_in_test(env) when env in [:test, :benchmark], do: [] @@ -237,14 +241,14 @@ defmodule Pleroma.Application do ] end - defp chat_child(true) do + defp shout_child(true) do [ - Pleroma.Web.ChatChannel.ChatChannelState, + Pleroma.Web.ShoutChannel.ShoutChannelState, {Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]} ] end - defp chat_child(_), do: [] + defp shout_child(_), do: [] defp task_children(:test) do [