pypiserver / pypiserver

Minimal PyPI server for uploading & downloading packages with pip/easy_install

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow thread/process count to be configurable

matteius opened this issue · comments

From what I can tell, there is not currently a way to specify to the underlying server package how many threads it should run with. The default wsgi server is single threaded and thats fine, but for example waitress, which we use on Windows for pipenv test runner since it does speed up the tests, defaults to 4 threads or processes (not sure which) and while on my computer this is great, the github actions runner has 2 cores and so this is totally overkill. Ideally we could specify 2 processes for this (configurable) when starting the pypiserver. If no server is installed beyond the default, then maybe emit a warning that the default server is single threaded and the value will be discarded unless one of the other server implementations is provided.

Hey @matteius, that's a great idea! I will need to think about it a little to see where and how this can fit, but I really like the proposal. I'll be thinking which related features/plans can facilitate making this happen with the least need for large changes. Cool stuff! 👍