diff options
Diffstat (limited to 'lib/pleroma/application.ex')
-rw-r--r-- | lib/pleroma/application.ex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index 2969ca3c4..79b9dee9d 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -20,13 +20,18 @@ defmodule Pleroma.Application do limit: 2500 ]]), worker(Pleroma.Web.Federator, []), - worker(Pleroma.Web.ChatChannel.ChatChannelState, []), + worker(Pleroma.Stats, []), ] ++ if Mix.env == :test, do: [], else: [worker(Pleroma.Web.Streamer, [])] + ++ if !chat_enabled(), do: [], else: [worker(Pleroma.Web.ChatChannel.ChatChannelState, [])] # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html # for other strategies and supported options opts = [strategy: :one_for_one, name: Pleroma.Supervisor] Supervisor.start_link(children, opts) end + + defp chat_enabled do + Application.get_env(:pleroma, :chat, []) |> Keyword.get(:enabled) + end end |