-
-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
to not increment when call bar(0) #264
Comments
Yes, it makes sense. Also, it would be on par with the manual mode |
I have a similar request, but using a negative integer instead of My use case is simple. I'm downloading hundreds of thousands/millions of logs from OpenSearch, 10k at a time, and I know the total I will be receiving. Occasionally, a request fails, and I need to re-download some number of logs. I need to set the progress back to the last known good state and re-process the logs during redownload. If |
Humm, shouldn't you wait to forward the progress until you've successfully received the logs? It would work better because the user should see what is actually accomplished at each given moment. |
For a bit more context, the logs are downloaded in 24hr batches. So let's say you have a single batch of ~373k logs out of ~1.7m total, and for each 10k that is processed (transformed to JSON and written to file), the progress moves forward 10k. 220k logs into the operation, a request fails, so the file is unlinked and the batch restarts from the beginning. Or perhaps the batch completes, but received too few logs due to a concurrent re-index that started during the operation. The progress bar now needs to be reduced to the count after the previous batch to properly indicate the current state of the operation, and I would like to keep the automatic percentage calculation, ETA, etc afforded by not using manual mode. I originally tried to use two progress bars, one for the aggregate total, updated when each batch completed, and one for each batch total, but realized two bars cannot be run at the same time. Perhaps each bar could run in its own thread with its own state? I haven't had time to look through the code thoroughly to see if this is feasible or not. |
Yep, I see. Thanks for the thorough explanation. |
I have to check the progress each periode of time then update the bar with pregression difference, but this value could be 0, so it updated 1 while it doesn't need.
I can add a condition to check if it is 0 but it would be logical to not increment when call bar(0).
The text was updated successfully, but these errors were encountered: