-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cve_feed: manage http request and add request log (#1407)
**NOTE**: Turn on "Hide whitespaces" to review ### Summary We got some memory problem recently especially after NVD API becomes more unstable and retries are more often. This change attempts to reduce the memory leak while many requests are created, also logging the requests to help debug easier as there might be more improvements needed for this to work nicer. * Added a log statement to indicate when the NIST NVD API is being called, which includes the URL and parameters being used. * Wrap the `requests.get` call to use a context manager (`with` statement) to ensure the response is properly closed after use. --------- Signed-off-by: Khanh Le Do <[email protected]>
- Loading branch information
1 parent
59306e6
commit 8043cdd
Showing
2 changed files
with
34 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters