-
Notifications
You must be signed in to change notification settings - Fork 456
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
Asynchronous extractor module #741
Conversation
revert some changes
update
Until everything will get converted to async, we have to keep two flavors of functions sometime.
Codecov Report
@@ Coverage Diff @@
## master #741 +/- ##
==========================================
- Coverage 87.71% 79.69% -8.02%
==========================================
Files 76 76
Lines 2173 2241 +68
Branches 264 269 +5
==========================================
- Hits 1906 1786 -120
- Misses 208 390 +182
- Partials 59 65 +6
Continue to review full report at Codecov.
|
cve_bin_tool/extractor.py
Outdated
await aio_rmdir(self.tempdir) | ||
|
||
def extract(self, filename): | ||
aws = asyncio.gather(self.aio_extract(filename)) |
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.
Why the use of gather
here?
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 am using ensure_future
now.
I have converted every I/O functions into async and I have also kept sync counterpart of some otherwise it will break CI. This sync function will eventually get removed once every module will become asynchronous.