From 1d5382ab8faf49a6caeabf1959497bd289641306 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Fri, 4 Nov 2016 14:03:19 -0700 Subject: adding return value --- system/api/analytics/batch.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'system/api/analytics/batch.go') diff --git a/system/api/analytics/batch.go b/system/api/analytics/batch.go index 1b35339..4f6d57e 100644 --- a/system/api/analytics/batch.go +++ b/system/api/analytics/batch.go @@ -66,7 +66,7 @@ func batchPrune(threshold time.Duration) error { err := store.Update(func(tx *bolt.Tx) error { b := tx.Bucket([]byte("requests")) - b.ForEach(func(k, v []byte) error { + err := b.ForEach(func(k, v []byte) error { var r apiRequest err := json.Unmarshal(v, &r) if err != nil { @@ -84,6 +84,11 @@ func batchPrune(threshold time.Duration) error { return nil }) + if err != nil { + return err + } + + return nil }) if err != nil { return err -- cgit v1.2.3