-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[v2] S3 progress indicator frequency #9545
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
base: cli-accessibility
Are you sure you want to change the base?
Conversation
1983e09
to
d4e4f48
Compare
e0f7597
to
c522dbd
Compare
d4e4f48
to
2366b20
Compare
Adds parameter for output progress frequency, defaulting to 0 to keep current behavior. Add multiline output control to allow for writing the progress report to a new line.
4a32a93
to
7c922cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Any thoughts on adding tests for the multiline progress to verify it does print to multiple lines when the arg is supplied?
@@ -331,6 +333,8 @@ def __init__(self, result_recorder, out_file=None, error_file=None): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add docs for frequency
and oneline
?
|
||
def _override_progress_result_handler(self, result, result_handler): | ||
if ( | ||
type(result) in [ProgressResult] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could this be type(result) is ProgressResult
to be consistent with the same check in __call__
?
@@ -347,12 +351,31 @@ def __init__(self, result_recorder, out_file=None, error_file=None): | |||
DryRunResult: self._print_dry_run, | |||
FinalTotalSubmissionsResult: self._clear_progress_if_no_more_expected_transfers, | |||
} | |||
self._now = time.time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking: seems this initial value is never used, consider initializing to None
) | ||
result_handler(result=result) | ||
|
||
def _override_progress_result_handler(self, result, result_handler): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking question: have we considered modifying _print_progress
to check frequency
and first
with a similar check, and only print as needed, instead of adding a new override handler function?
Issue #, if available:
Description of changes:
Add the ability to control the frequency of updating the S3 progress indicator bar.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.