summaryrefslogtreecommitdiff
path: root/system/api/analytics/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'system/api/analytics/init.go')
-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 {