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: stats.lua returns email time instead of os time in unixtime field
Date Sun, 08 Jan 2017 12:45:07 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master febc83739 -> 57442e43c


stats.lua returns email time instead of os time in unixtime field

This fixes #331

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

Branch: refs/heads/master
Commit: 57442e43cbbe34b09cc712aaa226a3d6708b7c11
Parents: febc837
Author: Sebb <sebb@apache.org>
Authored: Sun Jan 8 12:44:58 2017 +0000
Committer: Sebb <sebb@apache.org>
Committed: Sun Jan 8 12:44:58 2017 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/57442e43/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f88077d..db305d3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -112,6 +112,7 @@
 - 'hot topics' feature should use terms, not significant_terms (#329)
 - 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)
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/57442e43/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 9be94d7..cc323a6 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -82,7 +82,6 @@ function handle(r)
     local now = r:clock()
     local tnow = now
     local get = r:parseargs()
-    local lastEmail = 0
     -- statsOnly: Whether to only send statistical info (for n-grams etc), and not the
     -- thread struct and message bodies
     -- Param: quick
@@ -529,10 +528,6 @@ function handle(r)
     for k = #dhh, 1, -1 do
         local v = dhh[k]
         local email = v._source
-        local eepoch = tonumber(email.epoch)
-        if eepoch > lastEmail then
-            lastEmail = eepoch
-        end
         if aaa.canAccessDoc(r, email, account) then
 
             h = h + 1
@@ -691,13 +686,7 @@ function handle(r)
     listdata.cloud = cloud
     listdata.took = r:clock() - now
     listdata.numparts = allparts
-    
-    -- date of last email seen
-    if lastEmail == 0 then
-        lastEmail = os.time()
-    end
-    
-    listdata.unixtime = lastEmail
+    listdata.unixtime = os.time()
     
     -- Debug time point 9
     table.insert(t, r:clock() - tnow)


Mime
View raw message