+ for_restart =
+ Pleroma.Repo.all(Config)
+ |> Enum.map(&update_env(&1))
+
+ # We need to restart applications for loaded settings take effect
+ for_restart
+ |> Enum.reject(&(&1 in [:pleroma, :ok]))
+ |> Enum.each(fn app ->
+ Application.stop(app)
+ :ok = Application.start(app)
+ end)