This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how Nectar configures requests to be thread-safe
Previously, Nectar set the configuration at a session level. This didn't cause problems because Nectar is only ever used to download with one set of settings. However, the pulp_streamer has to change the configuration on a request-by-request basis _and_ it needs to use a session to pool connections. This leads to trouble when attempting to update the configuration since Nectar changes it for all requests rather than a specific one. This patch instead adds a method to translate a Nectar configuration to a set of requests kwargs that work with the ``requests.request`` API. This allows the streamer to stash its session instance between instances of a Nectar HTTPThreadedDownloader without corruption. fixes #2111
- Loading branch information
1 parent
7699227
commit 4fe7327
Showing
2 changed files
with
139 additions
and
15 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