ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: Use constant for max list count instead of 500000
Date Tue, 24 Jan 2017 11:51:40 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master d8fea0a6f -> 78342028f


Use constant for max list count instead of 500000

This fixes #352

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/78342028
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/78342028
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/78342028

Branch: refs/heads/master
Commit: 78342028f25afedfb8ddc2dcfeacac6ea0abdc7b
Parents: d8fea0a
Author: Sebb <sebb@apache.org>
Authored: Tue Jan 24 11:51:29 2017 +0000
Committer: Sebb <sebb@apache.org>
Committed: Tue Jan 24 11:51:29 2017 +0000

----------------------------------------------------------------------
 CHANGELOG.md             | 1 +
 site/api/lib/utils.lua   | 1 +
 site/api/preferences.lua | 3 ++-
 site/api/static.lua      | 5 +++--
 site/api/stats.lua       | 2 +-
 5 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/78342028/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 473bbf6..8ffb461 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -131,6 +131,7 @@
 - GUI ignores date span in list.html URI if query is blank (#346)
 - search phrase dropped from list.html URI if date span is yyyy-mm (#347)
 - stats.lua first/last dates don't always agree with visible mails (#350)
+- Use constant for max list count instead of 500000 (#352)
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/78342028/site/api/lib/utils.lua
----------------------------------------------------------------------
diff --git a/site/api/lib/utils.lua b/site/api/lib/utils.lua
index 131804c..7d3f778 100644
--- a/site/api/lib/utils.lua
+++ b/site/api/lib/utils.lua
@@ -123,6 +123,7 @@ local function lastDayOfMonth(yyyy, mm)
 end
 
 return {
+    MAX_LIST_COUNT = 500000, -- used for aggs size=n
     anonymizeHdrs = anonymizeHdrs,
     anonymizeBody = anonymizeBody,
     anonymizeEmail = anonymizeEmail,

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/78342028/site/api/preferences.lua
----------------------------------------------------------------------
diff --git a/site/api/preferences.lua b/site/api/preferences.lua
index 353bd34..e4068de 100644
--- a/site/api/preferences.lua
+++ b/site/api/preferences.lua
@@ -24,6 +24,7 @@ local cross = require 'lib/cross'
 local smtp = require 'socket.smtp'
 local config = require 'lib/config'
 local aaa = require 'lib/aaa'
+local utils = require 'lib/utils'
 
 --[[
     Remove nulls values from a table
@@ -291,7 +292,7 @@ Pony Mail - Email for Ponies and People.
                 listnames = {
                     terms = {
                         field = "list_raw",
-                        size = 500000
+                        size = utils.MAX_LIST_COUNT
                     },
                     aggs = {
                         -- split list into public and private buckets

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/78342028/site/api/static.lua
----------------------------------------------------------------------
diff --git a/site/api/static.lua b/site/api/static.lua
index b0dd4c8..984791f 100644
--- a/site/api/static.lua
+++ b/site/api/static.lua
@@ -23,6 +23,7 @@ local user = require 'lib/user'
 local aaa = require 'lib/aaa'
 local config = require 'lib/config'
 local cross = require 'lib/cross'
+local utils = require 'lib/utils'
 
 local function sortEmail(thread)
     if thread.children and type(thread.children) == "table" then
@@ -203,7 +204,7 @@ function handle(r)
                 from = {
                     terms = {
                         field = "list_raw",
-                        size = 500000
+                        size = utils.MAX_LIST_COUNT
                     }
                 }
             },
@@ -242,7 +243,7 @@ function handle(r)
                 from = {
                     terms = {
                         field = "list_raw",
-                        size = 500000
+                        size = utils.MAX_LIST_COUNT
                     }
                 }
             },

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/78342028/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 27b52c8..b29c97a 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -403,7 +403,7 @@ function handle(r)
                 lists = {
                     terms = {
                         field = "list_raw",
-                        size = 500000
+                        size = utils.MAX_LIST_COUNT
                     },
                     aggs = {
                         private = {


Mime
View raw message