X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fapplication.ex;h=79b9dee9d2412194f55dd50d5bb12182e953a338;hb=09de76ad5af57c238188d41353232a872c6b30dc;hp=6267d0695b59ce9b5b59ed5941f09c7addf2fa82;hpb=11ea08649d5a5e5d2ac9ee29406f53240be77ec4;p=akkoma diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index 6267d0695..79b9dee9d 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -18,12 +18,20 @@ defmodule Pleroma.Application do default_ttl: 25000, ttl_interval: 1000, limit: 2500 - ]]) + ]]), + worker(Pleroma.Web.Federator, []), + 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