projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix aliases sorting
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index 9e262235eef83c86b2426924508699ac7c7dc1ef..9824e0a4ac3353ff195014cdcb591f6d1b809dda 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-14,7
+14,7
@@
defmodule Pleroma.Application do
@name Mix.Project.config()[:name]
@version Mix.Project.config()[:version]
@repository Mix.Project.config()[:source_url]
@name Mix.Project.config()[:name]
@version Mix.Project.config()[:version]
@repository Mix.Project.config()[:source_url]
- @env Mix.env()
+ @
mix_
env Mix.env()
def name, do: @name
def version, do: @version
def name, do: @name
def version, do: @version
@@
-25,7
+25,7
@@
defmodule Pleroma.Application do
if Process.whereis(Pleroma.Web.Endpoint) do
case Config.get([:http, :user_agent], :default) do
:default ->
if Process.whereis(Pleroma.Web.Endpoint) do
case Config.get([:http, :user_agent], :default) do
:default ->
- info = "#{Pleroma.Web.
base_
url()} <#{Config.get([:instance, :email], "")}>"
+ info = "#{Pleroma.Web.
Endpoint.
url()} <#{Config.get([:instance, :email], "")}>"
named_version() <> "; " <> info
custom ->
named_version() <> "; " <> info
custom ->
@@
-92,20
+92,18
@@
defmodule Pleroma.Application do
Pleroma.Web.Plugs.RateLimiter.Supervisor
] ++
cachex_children() ++
Pleroma.Web.Plugs.RateLimiter.Supervisor
] ++
cachex_children() ++
- http_children(adapter, @env) ++
+ http_children(adapter, @
mix_
env) ++
[
Pleroma.Stats,
Pleroma.JobQueueMonitor,
{Majic.Pool, [name: Pleroma.MajicPool, pool_size: Config.get([:majic_pool, :size], 2)]},
[
Pleroma.Stats,
Pleroma.JobQueueMonitor,
{Majic.Pool, [name: Pleroma.MajicPool, pool_size: Config.get([:majic_pool, :size], 2)]},
- {Oban, Config.get(Oban)}
+ {Oban, Config.get(Oban)},
+ Pleroma.Web.Endpoint
] ++
] ++
- task_children(@env) ++
- dont_run_in_test(@env) ++
- chat_child(chat_enabled?()) ++
- [
- Pleroma.Web.Endpoint,
- Pleroma.Gopher.Server
- ]
+ task_children(@mix_env) ++
+ dont_run_in_test(@mix_env) ++
+ shout_child(shout_enabled?()) ++
+ [Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
@@
-145,7
+143,7
@@
defmodule Pleroma.Application do
raise "Invalid custom modules"
{:ok, modules, _warnings} ->
raise "Invalid custom modules"
{:ok, modules, _warnings} ->
- if @env != :test do
+ if @
mix_
env != :test do
Enum.each(modules, fn mod ->
Logger.info("Custom module loaded: #{inspect(mod)}")
end)
Enum.each(modules, fn mod ->
Logger.info("Custom module loaded: #{inspect(mod)}")
end)
@@
-218,7
+216,7
@@
defmodule Pleroma.Application do
type: :worker
}
type: :worker
}
- defp
chat_enabled?, do: Config.get([:cha
t, :enabled])
+ defp
shout_enabled?, do: Config.get([:shou
t, :enabled])
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
@@
-230,17
+228,23
@@
defmodule Pleroma.Application do
keys: :duplicate,
partitions: System.schedulers_online()
]}
keys: :duplicate,
partitions: System.schedulers_online()
]}
+ ] ++ background_migrators()
+ end
+
+ defp background_migrators do
+ [
+ Pleroma.Migrators.HashtagsTableMigrator
]
end
]
end
- defp
cha
t_child(true) do
+ defp
shou
t_child(true) do
[
[
- Pleroma.Web.
ChatChannel.Cha
tChannelState,
+ Pleroma.Web.
ShoutChannel.Shou
tChannelState,
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
- defp
cha
t_child(_), do: []
+ defp
shou
t_child(_), do: []
defp task_children(:test) do
[
defp task_children(:test) do
[