Isolate OAuth.Token.CleanWorker
This commit is contained in:
parent
51bdf0cab6
commit
15ef521009
2 changed files with 18 additions and 16 deletions
|
|
@ -59,6 +59,7 @@ defmodule Pleroma.Application do
|
|||
restart: :temporary
|
||||
}
|
||||
] ++
|
||||
oauth_cleanup_child(oauth_cleanup_enabled?()) ++
|
||||
streamer_child(@env) ++
|
||||
chat_child(@env, chat_enabled?()) ++
|
||||
[
|
||||
|
|
@ -134,12 +135,20 @@ defmodule Pleroma.Application do
|
|||
|
||||
defp chat_enabled?, do: Pleroma.Config.get([:chat, :enabled])
|
||||
|
||||
defp oauth_cleanup_enabled?,
|
||||
do: Pleroma.Config.get([:oauth2, :clean_expired_tokens], false)
|
||||
|
||||
defp streamer_child(:test), do: []
|
||||
|
||||
defp streamer_child(_) do
|
||||
[Pleroma.Web.Streamer]
|
||||
end
|
||||
|
||||
defp oauth_cleanup_child(true),
|
||||
do: [Pleroma.Web.OAuth.Token.CleanWorker]
|
||||
|
||||
defp oauth_cleanup_child(_), do: []
|
||||
|
||||
defp chat_child(:test, _), do: []
|
||||
|
||||
defp chat_child(_env, true) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue