You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I start my progress bar as indeterminate for the first query that retrieves the count.
Then I set the count as the new max, my log line does show the correct number.
The progress bar never changes from indeterminate to an actual progress bar.
Here is my setup.
bar:=progressbar.NewOptions(
-1,
progressbar.OptionSetDescription("Fetching messages from API"),
progressbar.OptionSetWriter(os.Stderr),
progressbar.OptionFullWidth(),
progressbar.OptionEnableColorCodes(true),
progressbar.OptionSetPredictTime(true),
progressbar.OptionShowCount(),
progressbar.OptionShowIts(),
progressbar.OptionShowElapsedTimeOnFinish(),
progressbar.OptionSetItsString("Msgs"),
progressbar.OptionSpinnerType(14),
progressbar.OptionSetRenderBlankState(true),
)
// This is just the initial queryfolderMessages:=f.getMessages(client, log.Named("Messages"), queryLimit)
msgCount:=*folderMessages.GetOdataCount()
log.With(zap.Int64("Count", msgCount)).Info("Message Count")
bar.ChangeMax64(msgCount)
// Proceeds to the processing loop
And inside my loop.
iferr:=bar.Add(1); err!=nil {
log.With(zap.Error(err)).Error("Failed to increment progress bar!")
}
The text was updated successfully, but these errors were encountered:
I start my progress bar as indeterminate for the first query that retrieves the count.
Then I set the count as the new max, my log line does show the correct number.
The progress bar never changes from indeterminate to an actual progress bar.
Here is my setup.
And inside my loop.
The text was updated successfully, but these errors were encountered: