projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'features/mastoapi/2.7.0-auth-error-messages' into 'develop'
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index d67e2cdc8fbae0fa976f9ef6a7eb381ccb64a0c1..cc81e180565eb84ea0399692b5c48b5a4762c196 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-11,10
+11,10
@@
defmodule Pleroma.Application do
@repository Mix.Project.config()[:source_url]
def name, do: @name
def version, do: @version
@repository Mix.Project.config()[:source_url]
def name, do: @name
def version, do: @version
- def named_version
()
, do: @name <> " " <> @version
+ def named_version, do: @name <> " " <> @version
def repository, do: @repository
def repository, do: @repository
- def user_agent
()
do
+ def user_agent do
info = "#{Pleroma.Web.base_url()} <#{Pleroma.Config.get([:instance, :email], "")}>"
named_version() <> "; " <> info
end
info = "#{Pleroma.Web.base_url()} <#{Pleroma.Config.get([:instance, :email], "")}>"
named_version() <> "; " <> info
end
@@
-48,7
+48,7
@@
defmodule Pleroma.Application do
[
:user_cache,
[
[
:user_cache,
[
- default_ttl: 25000,
+ default_ttl: 25
_
000,
ttl_interval: 1000,
limit: 2500
]
ttl_interval: 1000,
limit: 2500
]
@@
-60,7
+60,7
@@
defmodule Pleroma.Application do
[
:object_cache,
[
[
:object_cache,
[
- default_ttl: 25000,
+ default_ttl: 25
_
000,
ttl_interval: 1000,
limit: 2500
]
ttl_interval: 1000,
limit: 2500
]
@@
-108,9
+108,10
@@
defmodule Pleroma.Application do
hackney_pool_children() ++
[
worker(Pleroma.Web.Federator.RetryQueue, []),
hackney_pool_children() ++
[
worker(Pleroma.Web.Federator.RetryQueue, []),
- worker(Pleroma.Web.Federator, []),
worker(Pleroma.Stats, []),
worker(Pleroma.Stats, []),
- worker(Pleroma.Web.Push, [])
+ worker(Pleroma.Web.Push, []),
+ worker(Pleroma.Jobs, []),
+ worker(Task, [&Pleroma.Web.Federator.init/0], restart: :temporary)
] ++
streamer_child() ++
chat_child() ++
] ++
streamer_child() ++
chat_child() ++
@@
-126,7
+127,7
@@
defmodule Pleroma.Application do
Supervisor.start_link(children, opts)
end
Supervisor.start_link(children, opts)
end
- def enabled_hackney_pools
()
do
+ def enabled_hackney_pools do
[:media] ++
if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Hackney do
[:federation]
[:media] ++
if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Hackney do
[:federation]
@@
-141,14
+142,14
@@
defmodule Pleroma.Application do
end
if Mix.env() == :test do
end
if Mix.env() == :test do
- defp streamer_child
()
, do: []
- defp chat_child
()
, do: []
+ defp streamer_child, do: []
+ defp chat_child, do: []
else
else
- defp streamer_child
()
do
+ defp streamer_child do
[worker(Pleroma.Web.Streamer, [])]
end
[worker(Pleroma.Web.Streamer, [])]
end
- defp chat_child
()
do
+ defp chat_child do
if Pleroma.Config.get([:chat, :enabled]) do
[worker(Pleroma.Web.ChatChannel.ChatChannelState, [])]
else
if Pleroma.Config.get([:chat, :enabled]) do
[worker(Pleroma.Web.ChatChannel.ChatChannelState, [])]
else
@@
-157,7
+158,7
@@
defmodule Pleroma.Application do
end
end
end
end
- defp hackney_pool_children
()
do
+ defp hackney_pool_children do
for pool <- enabled_hackney_pools() do
options = Pleroma.Config.get([:hackney_pools, pool])
:hackney_pool.child_spec(pool, options)
for pool <- enabled_hackney_pools() do
options = Pleroma.Config.get([:hackney_pools, pool])
:hackney_pool.child_spec(pool, options)