X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=lib%2Fmix%2Fpleroma.ex;h=3ad6edbfbb659d5830d4abb2ce83d0e82b038b16;hb=fe1cb56fdc52092a8af2895fae4c020679156674;hp=faeb30e1dc378da65b601ce01f4deb537056a2e6;hpb=b923842e96e821afeb7bbfa0d098b9c5698281c5;p=akkoma
diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex
index faeb30e1d..3ad6edbfb 100644
--- a/lib/mix/pleroma.ex
+++ b/lib/mix/pleroma.ex
@@ -1,12 +1,30 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Mix.Pleroma do
@doc "Common functions to be reused in mix tasks"
def start_pleroma do
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
+
+ if Pleroma.Config.get(:env) != :test do
+ Application.put_env(:logger, :console, level: :debug)
+ end
+
{:ok, _} = Application.ensure_all_started(:pleroma)
+
+ if Pleroma.Config.get(:env) not in [:test, :benchmark] do
+ pleroma_rebooted?()
+ end
+ end
+
+ defp pleroma_rebooted? do
+ if Restarter.Pleroma.rebooted?() do
+ :ok
+ else
+ Process.sleep(10)
+ pleroma_rebooted?()
+ end
end
def load_pleroma do