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
10 # Define workers and child supervisors to be supervised
13 # Start the Ecto repository
14 supervisor(Pleroma.Repo, []),
15 # Start the endpoint when the application starts
16 supervisor(Pleroma.Web.Endpoint, []),
17 # Start your own worker by calling: Pleroma.Worker.start_link(arg1, arg2, arg3)
18 # worker(Pleroma.Worker, [arg1, arg2, arg3]),
34 default: :timer.seconds(6 * 60 * 60),
35 interval: :timer.seconds(60)
42 worker(Pleroma.Web.Federator, []),
43 worker(Pleroma.Gopher.Server, []),
44 worker(Pleroma.Stats, [])
46 if Mix.env() == :test,
49 [worker(Pleroma.Web.Streamer, [])] ++
53 else: [worker(Pleroma.Web.ChatChannel.ChatChannelState, [])]
56 # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
57 # for other strategies and supported options
58 opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
59 Supervisor.start_link(children, opts)
63 Application.get_env(:pleroma, :chat, []) |> Keyword.get(:enabled)