-
Notifications
You must be signed in to change notification settings - Fork 217
feat: Use multiple threading for chunked upload #800
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
Conversation
Pull Request Test Coverage Report for Build 4322289600
💛 - Coveralls |
mwwoda
left a comment
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.
Couple of nits
| value = upload_results.pop(0) | ||
| if isinstance(value, Exception): | ||
| time.sleep(randint(0, 1)) | ||
| raise value | ||
| time.sleep(randint(0, 1)) | ||
| return value |
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.
You could move sleep before isinstance check and get rid of duplicated sleep call
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.
Sure I was testing different delays for exc and actual response, but forgot to move it as I use now same value.
| for future in as_completed(futures): | ||
| future.result() | ||
| except Exception as exc: | ||
| self._executor.shutdown(wait=True) |
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.
Looks like by default wait is set to True - https://docs.python.org/3/library/concurrent.futures.html
You could get rid of it if you want
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.
I know, but I want to make it clear that we wait
mwwoda
left a comment
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.
🚀
No description provided.