diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2018-12-06 19:55:58 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2018-12-06 19:55:58 +0700 |
commit | 8b4397c704147bcc5ca12ab60dde32f2b6e11a41 (patch) | |
tree | f1d26585be6673b495d3f4b8bea4deb5f0283d42 /lib/pleroma/application.ex | |
parent | 04a48286e69704bf83429b85dbcdb70863bdcff1 (diff) | |
parent | 52ce368562de919f1806dfd5235642caf0666e16 (diff) | |
download | pleroma-8b4397c704147bcc5ca12ab60dde32f2b6e11a41.tar.gz |
Merge branch 'develop' into feature/compat/push-subscriptions
# Conflicts:
# lib/mix/tasks/sample_config.eex
# lib/pleroma/web/twitter_api/controllers/util_controller.ex
# mix.exs
# mix.lock
Diffstat (limited to 'lib/pleroma/application.ex')
-rw-r--r-- | lib/pleroma/application.ex | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index 565e938fd..d0f23527f 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 @@ -12,18 +19,35 @@ defmodule Pleroma.Application do [ # 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(Cachex, [ - :user_cache, + worker( + Cachex, + [ + :user_cache, + [ + default_ttl: 25000, + ttl_interval: 1000, + limit: 2500 + ] + ], + id: :cachex_user + ), + worker( + Cachex, [ - default_ttl: 25000, - ttl_interval: 1000, - limit: 2500 - ] - ]), + :object_cache, + [ + default_ttl: 25000, + ttl_interval: 1000, + limit: 2500 + ] + ], + id: :cachex_object + ), worker( Cachex, [ @@ -40,11 +64,12 @@ defmodule Pleroma.Application do id: :cachex_idem ), worker(Pleroma.Web.Federator, []), + worker(Pleroma.Web.Federator.RetryQueue, []), worker(Pleroma.Gopher.Server, []), worker(Pleroma.Stats, []), worker(Pleroma.Web.Push, []) ] ++ - if Mix.env() == :test, + if @env == :test, do: [], else: [worker(Pleroma.Web.Streamer, [])] ++ |