release-engineering / pubtools-pulplib

A Pulp library for publishing tools
GNU General Public License v3.0
2 stars 24 forks source link

Make client thread count configurable by public API #185

Closed rohanpm closed 2 years ago

rohanpm commented 2 years ago

Thread counts used by pulplib.Client have already been configurable by env vars as a hidden feature. I'd like to promote this to public API because I now have a case where a single process should use more than one instance of Client at once. In that case, a single env var is not a convenient way to configure the thread count, as you probably want to use a lower thread count than usual if you're creating more clients.

The details of how the client manages its work internally shouldn't be baked into the API, so there is just one option covering the client's multiple thread pools rather than an option per pool.

codecov[bot] commented 2 years ago

Codecov Report

Merging #185 (57dfe63) into master (9945411) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #185   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        46           
  Lines         2829      2832    +3     
=========================================
+ Hits          2829      2832    +3     
Impacted Files Coverage Δ
pubtools/pulplib/_impl/client/client.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9945411...57dfe63. Read the comment docs.