Merge branch 'develop' into feature/database-compaction

This commit is contained in:
rinpatch 2019-04-17 12:22:32 +03:00
commit 627e5a0a49
1271 changed files with 42114 additions and 70683 deletions

View file

@ -6,9 +6,9 @@ defmodule Mix.Tasks.CompactDatabase do
require Logger
use Mix.Task
import Mix.Ecto
import Ecto.Query
alias Pleroma.{Repo, Object, Activity}
alias Pleroma.Activity
alias Pleroma.Repo
defp maybe_compact(%Activity{data: %{"object" => %{"id" => object_id}}} = activity) do
data =
@ -33,7 +33,7 @@ defmodule Mix.Tasks.CompactDatabase do
)
end
def run(args) do
def run(_args) do
Application.ensure_all_started(:pleroma)
max = Repo.aggregate(Activity, :max, :id)