Skip to content

Commit 488ed5b

Browse files
committed
Update usage.go
1 parent 2e057b2 commit 488ed5b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

premium/usage.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ func (u *BatchUpdater) setupAWSMarketplace() error {
302302
}
303303
u.teamName = "AWS_MARKETPLACE"
304304
// This needs to be larger than normal, because we can only send a single usage record per second (from each compute node)
305-
u.batchLimit = 3294967294
305+
u.batchLimit = 1000000000
306306

307-
u.minTimeBetweenFlushes = 60 * time.Minute
307+
u.minTimeBetweenFlushes = 1 * time.Minute
308308
u.maxRetries = max(u.maxRetries, marketplaceMinRetries)
309309
u.backgroundUpdater()
310310

@@ -505,7 +505,6 @@ func (u *BatchUpdater) backgroundUpdater() {
505505
continue
506506
}
507507

508-
u.logger.Debug().Dur("since_last_update", time.Since(u.lastUpdateTime)).Dur("min_time_between_flushes", u.minTimeBetweenFlushes).Uint32("totals", totals).Uint32("Batch Limit", u.batchLimit).Msg("trigger update")
509508
if err := u.updateUsageWithRetryAndBackoff(ctx, totals, tables); err != nil {
510509
u.logger.Warn().Err(err).Msg("failed to update usage")
511510
continue
@@ -527,7 +526,6 @@ func (u *BatchUpdater) backgroundUpdater() {
527526
if totals == 0 {
528527
continue
529528
}
530-
u.logger.Debug().Dur("since_last_update", time.Since(u.lastUpdateTime)).Dur("min_time_between_flushes", u.minTimeBetweenFlushes).Uint32("totals", totals).Uint32("Batch Limit", u.batchLimit).Msg("flush")
531529

532530
if err := u.updateUsageWithRetryAndBackoff(ctx, totals, tables); err != nil {
533531
u.logger.Warn().Err(err).Msg("failed to update usage")

0 commit comments

Comments
 (0)