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 worker(Pleroma.Emoji, []),
16 # Start the endpoint when the application starts
17 supervisor(Pleroma.Web.Endpoint, []),
18 # Start your own worker by calling: Pleroma.Worker.start_link(arg1, arg2, arg3)
19 # worker(Pleroma.Worker, [arg1, arg2, arg3]),
51 default: :timer.seconds(6 * 60 * 60),
52 interval: :timer.seconds(60)
59 worker(Pleroma.Web.Federator, []),
60 worker(Pleroma.Stats, []),
61 worker(Pleroma.Gopher.Server, [])
63 if Mix.env() == :test,
66 [worker(Pleroma.Web.Streamer, [])] ++
70 else: [worker(Pleroma.Web.ChatChannel.ChatChannelState, [])]
73 # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
74 # for other strategies and supported options
75 opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
76 Supervisor.start_link(children, opts)
80 Application.get_env(:pleroma, :chat, []) |> Keyword.get(:enabled)