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 =
)
end
- def run(args) do
+ def run(_args) do
Application.ensure_all_started(:pleroma)
max = Repo.aggregate(Activity, :max, :id)
Logger.info("Considering #{max} activities")
- chunks = 0..(round(max / 100))
+ chunks = 0..round(max / 100)
- Enum.each(chunks, fn (i) ->
+ Enum.each(chunks, fn i ->
min = i * 100
max = min + 100