diff options
author | Steven Fuchs <steven.fuchs@dockyard.com> | 2019-09-17 14:44:52 +0000 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2019-10-04 16:05:22 +0000 |
commit | a2e92a1b8acc44e620ed89b560ab845d265d88fe (patch) | |
tree | 5a10516a6c11e5d0030a5a428c6ff65adfef1411 /lib/pleroma/application.ex | |
parent | 7d5f20b50f299c96ccb12c7dd0fdae10c3f8d9c0 (diff) | |
download | pleroma-a2e92a1b8acc44e620ed89b560ab845d265d88fe.tar.gz |
remove remaining errors from tests
Diffstat (limited to 'lib/pleroma/application.ex')
-rw-r--r-- | lib/pleroma/application.ex | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index 45ea83c38..3b75bbe6a 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -42,23 +42,9 @@ defmodule Pleroma.Application do hackney_pool_children() ++ [ Pleroma.Web.Federator.RetryQueue, - Pleroma.Stats, - %{ - id: :web_push_init, - start: {Task, :start_link, [&Pleroma.Web.Push.init/0]}, - restart: :temporary - }, - %{ - id: :federator_init, - start: {Task, :start_link, [&Pleroma.Web.Federator.init/0]}, - restart: :temporary - }, - %{ - id: :internal_fetch_init, - start: {Task, :start_link, [&Pleroma.Web.ActivityPub.InternalFetchActor.init/0]}, - restart: :temporary - } + Pleroma.Stats ] ++ + task_children(@env) ++ oauth_cleanup_child(oauth_cleanup_enabled?()) ++ streamer_child(@env) ++ chat_child(@env, chat_enabled?()) ++ @@ -165,16 +151,38 @@ defmodule Pleroma.Application do end end - defp after_supervisor_start do - with digest_config <- Application.get_env(:pleroma, :email_notifications)[:digest], - true <- digest_config[:active] do - PleromaJobQueue.schedule( - digest_config[:schedule], - :digest_emails, - Pleroma.DigestEmailWorker - ) - end + defp task_children(:test) do + [ + %{ + id: :web_push_init, + start: {Task, :start_link, [&Pleroma.Web.Push.init/0]}, + restart: :temporary + }, + %{ + id: :federator_init, + start: {Task, :start_link, [&Pleroma.Web.Federator.init/0]}, + restart: :temporary + } + ] + end - :ok + defp task_children(_) do + [ + %{ + id: :web_push_init, + start: {Task, :start_link, [&Pleroma.Web.Push.init/0]}, + restart: :temporary + }, + %{ + id: :federator_init, + start: {Task, :start_link, [&Pleroma.Web.Federator.init/0]}, + restart: :temporary + }, + %{ + id: :internal_fetch_init, + start: {Task, :start_link, [&Pleroma.Web.ActivityPub.InternalFetchActor.init/0]}, + restart: :temporary + } + ] end end |