1 defmodule Pleroma.Application do
4 # See http://elixir-lang.org/docs/stable/elixir/Application.html
5 # for more information on OTP Applications
6 def start(_type, _args) do
9 # Define workers and child supervisors to be supervised
12 # Start the Ecto repository
13 supervisor(Pleroma.Repo, []),
14 # Start the endpoint when the application starts
15 supervisor(Pleroma.Web.Endpoint, []),
16 # Start your own worker by calling: Pleroma.Worker.start_link(arg1, arg2, arg3)
17 # worker(Pleroma.Worker, [arg1, arg2, arg3]),
31 default_ttl: :timer.seconds(6 * 60 * 60),
32 ttl_interval: :timer.seconds(60),
38 worker(Pleroma.Web.Federator, []),
39 worker(Pleroma.Gopher.Server, []),
40 worker(Pleroma.Stats, [])
42 if Mix.env() == :test,
45 [worker(Pleroma.Web.Streamer, [])] ++
49 else: [worker(Pleroma.Web.ChatChannel.ChatChannelState, [])]
52 # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
53 # for other strategies and supported options
54 opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
55 Supervisor.start_link(children, opts)
59 Application.get_env(:pleroma, :chat, []) |> Keyword.get(:enabled)