From c6d2f51415e6e65d3b14904670c4e2e700ecfdaa Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Fri, 4 Nov 2016 15:16:58 -0700 Subject: changing back pruneThreshold to 2 weeks, but running prune every week rather than 14 days --- 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 337eb08..68881b6 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -79,12 +79,11 @@ func serve() { // interval: 30 seconds apiRequestTimer := time.NewTicker(time.Second * 30) - // make timer to notify select to remove old analytics - // interval: 2 weeks + // make timer to notify select to remove analytics older than 14 days + // interval: 1 weeks // TODO: enable analytics backup service to cloud - // pruneThreshold := time.Hour * 24 * 14 - pruneThreshold := time.Second * 10 - pruneDBTimer := time.NewTicker(pruneThreshold) + pruneThreshold := time.Hour * 24 * 14 + pruneDBTimer := time.NewTicker(pruneThreshold / 2) for { select { -- cgit v1.2.3