From ae5f99260880ecc1f175d7db0dcaf6d4c890583f Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Fri, 4 Nov 2016 14:57:12 -0700 Subject: testing shorter prune period to gague effectiveness --- system/api/analytics/init.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'system/api/analytics/init.go') diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index 722cf0e..337eb08 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -4,15 +4,13 @@ package analytics import ( + "encoding/json" "log" "net/http" + "runtime" "strings" "time" - "runtime" - - "encoding/json" - "github.com/boltdb/bolt" ) @@ -84,7 +82,8 @@ func serve() { // make timer to notify select to remove old analytics // interval: 2 weeks // TODO: enable analytics backup service to cloud - pruneThreshold := time.Hour * 24 * 14 + // pruneThreshold := time.Hour * 24 * 14 + pruneThreshold := time.Second * 10 pruneDBTimer := time.NewTicker(pruneThreshold) for { -- cgit v1.2.3