1 defmodule Pleroma.Application do
5 @version Mix.Project.config()[:version]
7 def version, do: @version
8 def named_version(), do: @name <> " " <> @version
11 info = "#{Pleroma.Web.base_url()} <#{Pleroma.Config.get([:instance, :email], "")}>"
12 named_version() <> "; " <> info
15 # See http://elixir-lang.org/docs/stable/elixir/Application.html
16 # for more information on OTP Applications
18 def start(_type, _args) do
19 import Supervisor.Spec
22 # Define workers and child supervisors to be supervised
25 # Start the Ecto repository
26 supervisor(Pleroma.Repo, []),
27 worker(Pleroma.Emoji, []),
28 # Start the endpoint when the application starts
29 supervisor(Pleroma.Web.Endpoint, []),
30 # Start your own worker by calling: Pleroma.Worker.start_link(arg1, arg2, arg3)
31 # worker(Pleroma.Worker, [arg1, arg2, arg3]),
63 default: :timer.seconds(6 * 60 * 60),
64 interval: :timer.seconds(60)
71 worker(Pleroma.Web.Federator, []),
72 worker(Pleroma.Web.Federator.RetryQueue, []),
73 worker(Pleroma.Gopher.Server, []),
74 worker(Pleroma.Stats, [])
79 [worker(Pleroma.Web.Streamer, [])] ++
83 else: [worker(Pleroma.Web.ChatChannel.ChatChannelState, [])]
86 # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
87 # for other strategies and supported options
88 opts = [strategy: :one_for_one, name: Pleroma.Supervisor]
89 Supervisor.start_link(children, opts)
93 Application.get_env(:pleroma, :chat, []) |> Keyword.get(:enabled)