You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2017/01/08 23:33:10 UTC

incubator-ponymail git commit: stats.lua - cache causes inconsistent output when quick is used

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 57442e43c -> 079af347c


stats.lua - cache causes inconsistent output when quick is used

This fixes #118

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

Branch: refs/heads/master
Commit: 079af347cd6bf64074a0ec6b89fe175a8b860dd1
Parents: 57442e4
Author: Sebb <se...@apache.org>
Authored: Sun Jan 8 23:32:52 2017 +0000
Committer: Sebb <se...@apache.org>
Committed: Sun Jan 8 23:32:52 2017 +0000

----------------------------------------------------------------------
 CHANGELOG.md       | 1 +
 site/api/stats.lua | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/079af347/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db305d3..dbbbb84 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -113,6 +113,7 @@
 - stats.lua - slow_count option is unnecessary (#323)
 - stats.lua updates senders array unnecessarily in statsOnly (quick) mode (#330)
 - stats.lua returns email time instead of os time in unixtime field (#331)
+- stats.lua - cache causes inconsistent output when quick is used (#118)
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/079af347/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index cc323a6..4e05d18 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -402,7 +402,7 @@ function handle(r)
     local DATESPAN_KEY = "dateSpan:" .. NOWISH .. ":" .. get.list .. "@" .. get.domain
     local datespan = JSON.decode(r:ivm_get(DATESPAN_KEY) or "{}")
     
-    if not (datespan.firstYear and datespan.lastYear and datespan.firstMonth and datespan.lastMonth) and not statsOnly then
+    if not (datespan.firstYear and datespan.lastYear and datespan.firstMonth and datespan.lastMonth) then
         local doc = elastic.raw {
             size = 0,
             query = {