- in_db = Repo.all(ConfigDB)
-
- with_deleted = in_db ++ deleted
-
- reject_for_restart = if restart_pleroma?, do: @reject, else: [:pleroma | @reject]
-
- applications =
- with_deleted
- |> Enum.map(&merge_and_update(&1))
- |> Enum.uniq()
- # TODO: some problem with prometheus after restart!
- |> Enum.reject(&(&1 in reject_for_restart))
-
- # to be ensured that pleroma will be restarted last
- applications =
- if :pleroma in applications do
- List.delete(applications, :pleroma) ++ [:pleroma]