Restore original limits for user lists in statistics
authorTom Hughes <tom@compton.nu>
Tue, 5 Aug 2014 08:24:20 +0000 (09:24 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 5 Aug 2014 08:24:20 +0000 (09:24 +0100)
script/statistics

index c5d4012276eccf816ca48e6576d41b46d4cf092d..ce785bb07741523e483cd782dd7e82930b7fcbd3 100755 (executable)
@@ -62,9 +62,9 @@ begin
     puts "<table>"
     puts "<tr><th>Day</th><th>Week</th><th>Month</th></tr>"
 
-    day_users = OldNode.where("timestamp > NOW() - '1 DAY'::INTERVAL").joins(:changeset).order("count_all DESC").limit(50).group(:user_id).count
-    week_users = OldNode.where("timestamp > NOW() - '7 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(50).group(:user_id).count
-    month_users = OldNode.where("timestamp > NOW() - '28 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(50).group(:user_id).count
+    day_users = OldNode.where("timestamp > NOW() - '1 DAY'::INTERVAL").joins(:changeset).order("count_all DESC").group(:user_id).count
+    week_users = OldNode.where("timestamp > NOW() - '7 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(60).group(:user_id).count
+    month_users = OldNode.where("timestamp > NOW() - '28 DAYS'::INTERVAL").joins(:changeset).order("count_all DESC").limit(60).group(:user_id).count
 
     day_users.zip(week_users, month_users).each do |row|
       puts "<tr>"