feat(GODT-2828): Increase sync progress report frequency

We now report sync progress after a batch completes each stage.
This commit is contained in:
Leander Beernaert
2023-08-29 13:24:31 +02:00
parent f7252ed40e
commit a6c20f698c
9 changed files with 34 additions and 6 deletions

View File

@ -29,6 +29,7 @@ import (
)
const DefaultRetryCoolDown = 20 * time.Second
const NumSyncStages = 4
type LabelMap = map[string]proton.Label
@ -187,7 +188,7 @@ func (t *Handler) run(ctx context.Context,
syncStatus.TotalMessageCount = totalMessageCount
}
syncReporter.InitializeProgressCounter(ctx, syncStatus.NumSyncedMessages, syncStatus.TotalMessageCount)
syncReporter.InitializeProgressCounter(ctx, syncStatus.NumSyncedMessages, syncStatus.TotalMessageCount*NumSyncStages)
if !syncStatus.HasMessages {
t.log.Info("Syncing messages")