1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Mix.Tasks.Pleroma.CountStatuses do
6 @shortdoc "Re-counts statuses for all users"
13 Mix.Pleroma.start_pleroma()
18 |> Pleroma.Repo.stream()
20 Pleroma.Repo.transaction(fn ->
21 Enum.each(stream, &User.update_note_count/1)
24 Mix.Pleroma.shell_info("Done")