X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fstats.ex;h=8154a09b754a75b36d72b8e01700f0f2612cec7f;hb=43ea16870fe60578a6528e1f01bfaab68943a1bc;hp=df80fbaa41f0d62fd252444b16cef22325e1d9cc;hpb=9fb71ce7f44ec4824f9b7e2acbc89d0d16ad08bf;p=akkoma diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex index df80fbaa4..8154a09b7 100644 --- a/lib/pleroma/stats.ex +++ b/lib/pleroma/stats.ex @@ -68,12 +68,7 @@ defmodule Pleroma.Stats do domain_count = Enum.count(peers) - status_query = - from(u in User.Query.build(%{local: true}), - select: fragment("sum((?->>'note_count')::int)", u.info) - ) - - status_count = Repo.one(status_query) + status_count = Repo.aggregate(User.Query.build(%{local: true}), :sum, :note_count) user_count = Repo.aggregate(User.Query.build(%{local: true, active: true}), :count, :id)