Merge branch 'restart-fix-for-mix-tasks' into 'develop'

Wait in mix task while pleroma is rebooted

See merge request pleroma/pleroma!2225
This commit is contained in:
rinpatch 2020-03-07 09:32:29 +00:00
commit 6d797b9928
3 changed files with 51 additions and 14 deletions

View file

@ -12,6 +12,19 @@ defmodule Mix.Pleroma do
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