don't restart pleroma in mix tasks
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Fri, 3 Jul 2020 17:12:00 +0000 (20:12 +0300)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Wed, 8 Jul 2020 12:58:47 +0000 (15:58 +0300)
lib/mix/pleroma.ex
lib/pleroma/config/transfer_task.ex

index 553c74c25caab3c39ec9e90b110aaee2e62b7c81..0fbb6f1cdde0842eefbb892deb308e6fef641656 100644 (file)
@@ -22,7 +22,11 @@ defmodule Mix.Pleroma do
 
     Enum.each(apps, &Application.ensure_all_started/1)
 
-    childs = [Pleroma.Repo, Pleroma.Config.TransferTask, Pleroma.Web.Endpoint]
+    childs = [
+      Pleroma.Repo,
+      {Pleroma.Config.TransferTask, false},
+      Pleroma.Web.Endpoint
+    ]
 
     cachex_childs = Enum.map(@cachex_childs, &Pleroma.Application.build_cachex(&1, []))
 
index eb86b8ff490d8126a520ab9396bcb5f999493be8..a0d7b7d71b7952f7fadfc8f2b7c799f7bbea9394 100644 (file)
@@ -31,8 +31,8 @@ defmodule Pleroma.Config.TransferTask do
     {:pleroma, :gopher, [:enabled]}
   ]
 
-  def start_link(_) do
-    load_and_update_env()
+  def start_link(restart_pleroma? \\ true) do
+    load_and_update_env([], restart_pleroma?)
     if Config.get(:env) == :test, do: Ecto.Adapters.SQL.Sandbox.checkin(Repo)
     :ignore
   end