Disable bandwidth rollups until duplicate data issue is resolved (#2606)

* disable bandwidth rollups until duplicate data issue is resolved
* disable rollup to make sure summaries still work correctly without the rollup
This commit is contained in:
ethanadams 2019-07-20 06:39:14 -04:00 committed by Egon Elbre
parent 6778caf846
commit 5b73180f9b
2 changed files with 8 additions and 8 deletions

View File

@ -354,9 +354,9 @@ func (peer *Peer) Run(ctx context.Context) (err error) {
return errs2.IgnoreCanceled(peer.Vouchers.Run(ctx))
})
group.Go(func() error {
return errs2.IgnoreCanceled(peer.DB.Bandwidth().Run(ctx))
})
//group.Go(func() error {
// return errs2.IgnoreCanceled(peer.DB.Bandwidth().Run(ctx))
//})
group.Go(func() error {
// TODO: move the message into Server instead
@ -387,9 +387,9 @@ func (peer *Peer) Close() error {
// close services in reverse initialization order
if peer.DB.Bandwidth() != nil {
errlist.Add(peer.DB.Bandwidth().Close())
}
//if peer.DB.Bandwidth() != nil {
// errlist.Add(peer.DB.Bandwidth().Close())
//}
if peer.Vouchers != nil {
errlist.Add(peer.Vouchers.Close())
}

View File

@ -71,8 +71,8 @@ func TestBandwidthRollup(t *testing.T) {
require.NoError(t, err)
require.Equal(t, int64(27), usage.Total())
err = db.Bandwidth().Rollup(ctx)
require.NoError(t, err)
//err = db.Bandwidth().Rollup(ctx)
//require.NoError(t, err)
// After rollup, the totals should still be the same
usage, err = db.Bandwidth().Summary(ctx, time.Now().Add(time.Hour*-48), time.Now())