diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-04 15:16:58 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-04 15:16:58 -0700 |
commit | c6d2f51415e6e65d3b14904670c4e2e700ecfdaa (patch) | |
tree | 7ac275c75956d8236afd840afbfc52937c014557 /system/api/analytics | |
parent | 287aabcf42d4f3f8bea40f1b85945a42f5801bb1 (diff) |
changing back pruneThreshold to 2 weeks, but running prune every week rather than 14 days
Diffstat (limited to 'system/api/analytics')
-rw-r--r-- | system/api/analytics/init.go | 9 |
1 files changed, 4 insertions, 5 deletions
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 { |