summaryrefslogtreecommitdiff
path: root/system/api/analytics
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-04 14:57:12 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-04 14:57:12 -0700
commitae5f99260880ecc1f175d7db0dcaf6d4c890583f (patch)
treeed1a4379126547962d11a848dfc39b6e26e83915 /system/api/analytics
parent1d5382ab8faf49a6caeabf1959497bd289641306 (diff)
testing shorter prune period to gague effectiveness
Diffstat (limited to 'system/api/analytics')
-rw-r--r--system/api/analytics/init.go9
1 files changed, 4 insertions, 5 deletions
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 {