diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-11-04 14:03:19 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-11-04 14:03:19 -0700 |
commit | 1d5382ab8faf49a6caeabf1959497bd289641306 (patch) | |
tree | 60b757f7546f017bc4067446864969bb8388cc68 /system/api/analytics/batch.go | |
parent | ba0bdb862ed6ad2b586365df7ae1db3ae0f004d4 (diff) |
adding return value
Diffstat (limited to 'system/api/analytics/batch.go')
-rw-r--r-- | system/api/analytics/batch.go | 7 |
1 files changed, 6 insertions, 1 deletions
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 |