X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fapplication.ex;h=2d86efae51d6e073c3b4451c00dd6e3bf2ec9889;hb=1c67277c8031be2212d6faf84c143ac11462c87b;hp=607a0144c0546cea281a97e5f7bbbbcd28b0426e;hpb=763fc7b44fb5931f1a2f869d4c67a5ca9a0b5206;p=akkoma diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index 607a0144c..2d86efae5 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -1,8 +1,15 @@ defmodule Pleroma.Application do use Application + @name "Pleroma" + @version Mix.Project.config()[:version] + def name, do: @name + def version, do: @version + def named_version(), do: @name <> " " <> @version + # See http://elixir-lang.org/docs/stable/elixir/Application.html # for more information on OTP Applications + @env Mix.env() def start(_type, _args) do import Supervisor.Spec import Cachex.Spec @@ -10,10 +17,11 @@ defmodule Pleroma.Application do # Define workers and child supervisors to be supervised children = [ - worker(Pleroma.Config, [Application.get_all_env(:pleroma)]), # Start the Ecto repository supervisor(Pleroma.Repo, []), worker(Pleroma.Emoji, []), + # Start the endpoint when the application starts + supervisor(Pleroma.Web.Endpoint, []), # Start your own worker by calling: Pleroma.Worker.start_link(arg1, arg2, arg3) # worker(Pleroma.Worker, [arg1, arg2, arg3]), worker( @@ -56,12 +64,11 @@ defmodule Pleroma.Application do id: :cachex_idem ), worker(Pleroma.Web.Federator, []), - worker(Pleroma.Stats, []), - # Start the endpoint when the application starts - supervisor(Pleroma.Web.Endpoint, []), - worker(Pleroma.Gopher.Server, []) + worker(Pleroma.Web.Federator.RetryQueue, []), + worker(Pleroma.Gopher.Server, []), + worker(Pleroma.Stats, []) ] ++ - if Mix.env() == :test, + if @env == :test, do: [], else: [worker(Pleroma.Web.Streamer, [])] ++